Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAI-3325 Send a haittojenhallintasuunnitelma PDF to Allu #909

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

corvidian
Copy link
Contributor

Description

When sending a kaivuilmoitus to Allu, also send a haittojenhallintasuunnitelma along with it. There's a separate task for handling the haittojenhallintasuunnitelma for täydennys (HAI-3299).

The PDF is not complete. Currently, it only has basic information about the application.

The typography uses the Liberation Sans font since we can't distribute the Helsinki Grotesk font embedded in a PDF.

Use the new typography and styles also in the form data PDF for johtoselvityshakemus and kaivuilmoitus. The PDF section element was changed to stay together on one page, so the manual page breaks were removed from these reports.

In tests, add a matcher that checks that the name of an Attachment or a list of ApplicationAttachmentMetadata has the correct filename(s). Use the matcher in verifications to make it clear which Allu attachment calls are for what kinds of attachments.

Change the PDF file used in tests to be shorter. When tests fail, they sometimes print the PDF data as a byte array to the console. If the file is long, this can overflow the buffer, so the reason for the failure is lost. With the shorter file, this isn't likely. However, it will still happen with the generated PDF files.

Jira Issue:

Type of change

  • Bug fix
  • New feature
  • Other

Instructions for testing

There's a test that generates a PDF in the local filesystem. This can be used to quickly check the PDF styles.

For more complete testing, send a kaivuilmoitus to Allu. The generated PDF will be sent to Allu as an attachment.

The layouts of form data PDFs have also changed, so create a new johtoselvityshakemus with the kaivuilmoitus to check those attachments as well.

Checklist:

  • I have written new tests (if applicable)
  • I have ran the tests myself (if applicable)
  • I have made necessary changes to the documentation, link to confluence
    or other location:

When sending a kaivuilmoitus to Allu, also send a
haittojenhallintasuunnitelma along with it. There's a separate task for
handling the haittojenhallintasuunnitelma for täydennys (HAI-3299).

The PDF is not complete. Currently, it only has basic information about
the application.

The typography uses the Liberation Sans font since we can't distribute
the Helsinki Grotesk font embedded in a PDF.

Use the new typography and styles also in the form data PDF for
johtoselvityshakemus and kaivuilmoitus. The PDF section element was
changed to stay together on one page, so the manual page breaks were
removed from these reports.

In tests, add a matcher that checks that the name of an Attachment or a
list of ApplicationAttachmentMetadata has the correct filename(s). Use
the matcher in verifications to make it clear which Allu attachment
calls are for what kinds of attachments.

Change the PDF file used in tests to be shorter. When tests fail, they
sometimes print the PDF data as a byte array to the console. If the file
is long, this can overflow the buffer, so the reason for the failure is
lost. With the shorter file, this isn't likely. However, it will still
happen with the generated PDF files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant