Altinn/app-lib-dotnet

`enablePdfCreation` creates one PDF for each data type in a task

Opened this issue · 1 comments

Description

Not exactly sure how to categorize this, its not really a bug; however, the configuration is just weird.

  • In practice, we generate PDFs for tasks, not data types. This has been the case for a long time, but I'm not sure how things used to work in ye olden days.
  • enablePdfCreation is an option for data types in applicationmetadata, instead of a task/process configuration.
  • With multiple data models, this results in generating the same PDF multiple times if several data models for a given task has "enablePdfCreation": true.
    • So for now, you have to manually make sure only one of the data models used in a task has enablePdfCreation, if you use multiple data models for a single task.

bilde

In scope

No response

Out of scope

No response

Additional Information

No response

Analysis

No response

Conclusion

No response

Discussion summary:

  1. Yes, configuring pdf on data types is confusing/wrong and should be changed in v9.
  2. Yes, bad structure, but the current solution works for introducing multiple data models in v8.
  3. From 8.1.0 you won't get duplicate pdfs for a task even if multiple data elements on the task enables pdf generation.

Given that nothing here is a pressing issue and requires backwards incompatible changes, I'll add this to the v9 milestone, and hopefully we will fix it at the same time as other configuration issues.