HAI-3325 Send a haittojenhallintasuunnitelma PDF to Allu #909
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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:
or other location: