bcgov / foi-flow

Freedom of Information modernization
Apache License 2.0
4 stars 3 forks source link

Flatten the PDF documents with comments before Review/Redline #4708

Open abin-aot opened 8 months ago

abin-aot commented 8 months ago

Assumptions & Scope What are the assumptions for this story?

What is IN scope?

What is NOT in scope?

Acceptance Criteria

Scenario 1: xxxxxx

Scenario 2: xxxxxx

Scenario 3: xxxxxx ...

Dependencies? What is the impact of this dependency? (If so, link dependency in the ticket, make it visible in a team´s backlog)

Validation Rules? (If yes, list here)

Design @xxx - please link the Design here

Definition of Ready

  1. [ ] Is there a well articulated User Story?
  2. [ ] Is there Acceptance Criteria that covers all scenarios (happy/sad paths)?
  3. [ ] If there is a user interface, is there a design?
  4. [ ] Does the user story need user research/validation?
  5. [ ] Does this User Story needs stakeholder approval?
  6. [ ] Design / Solution accepted by Product Owner
  7. [ ] Is this user story small enough to be completed in a Sprint? Should it be split?
  8. [ ] Are the dependencies known/ understood? (technical, business, regulatory/policy)
  9. [ ] Has the story been estimated?

Definition of Done

  1. [ ] Passes developer unit tests
  2. [ ] Passes peer code review
  3. [ ] If there's a user interface, passes UX assurance
  4. [ ] Passes QA of Acceptance Criteria with verification in Dev and Test
  5. [ ] Confirm Test cases built and succeeding
  6. [ ] No regression test failures
  7. [ ] Test coverage acceptable by Product Owner
  8. [ ] Ticket ready to be merged to master or story branch
  9. [ ] Developer to list Config changes/ Update documents and designs
  10. [ ] Can be demoed in Sprint Review
  11. [ ] Tagged as part of a Release
  12. [ ] Feature flagged if required
  13. [ ] Change Management activities done?
abin-aot commented 8 months ago

@m-prodan , @lmullane , @KyEggleston - Please complete expectation of fix/task outcome, this is regarding the issue @nimya-aot has raised during our Release 9.0 known issue catch up

abin-aot commented 8 months ago

During sprint planning session of 09-November (Sprint Northern Flicker) , it was decided to monitor stats of PDF with comments coming, and act on the engineering for that. cc: @liseandtea @lmullane @KyEggleston @m-prodan

lmullane commented 7 months ago

Linked to bug #4748.

Analysis for quick fix to see if we can retroactively help an analyst.

abin-aot commented 7 months ago

As per the stand up on 28/11, the comments that comes as part of PDF, by default should be part of PDF document as part of flattening, This need to be confirmed. cc: @lmullane , @m-prodan , @liseandtea , @KyEggleston , @JHarrietha-AOT cc: @divyav-aot

abin-aot commented 7 months ago

As per stand up on 29/11

abin-aot commented 7 months ago

@divyav-aot is looking into printing, comments on very next page of the PDF! - Need to to follow up!

divyav-aot commented 7 months ago

Multiple options discussed during the standup:

  1. Option to preserve the visual annotations while removing those from the comments section.
  2. Keep the annotations in the comments section if the annotation has comments/content in it. Else, delete those annotations. If the annotations have comments/content in it, then insert those actual comments to a new pdf page and edit the actual comment with "flattened text"/any meaning full text. cc. @abin-aot @m-prodan
divyav-aot commented 7 months ago

The annotations texts are inserted based on the created_date asc order. I couldn't find any way to implement option1 mentioned above. I have implemented option 2. Please find the original and _updated file. [HTML-to-PDF.pdf] - Original File (https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBOWxCQWc9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--f68c3157073779c7bd5bc05ad848f8cf4594e448/HTML-to-PDF.pdf)

[HTML-to-PDF_updated.pdf] - Updated file after inserting the annotation text to the PDF

(https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBOXBCQWc9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--557f34dfb1f2d36800e9b2f049025568d3d5307c/HTML-to-PDF_updated.pdf) @m-prodan - could you please review and let me know if you have any concerns. cc. @abin-aot

KyEggleston commented 6 months ago

@divyav-aot - we showed this potential option to the pilot users, where the comments on a PDF show up on a separate page (as seen on image below).

image

The consensus was that this wasn't ideal, as it will alter the page count, and may make it difficult to cross reference the annotation on the page with the comment on the next page. The pilot users agreed handling PDFs with comments manually, for the time being, would be easier to get them how they want it.

Instead, we may want to explore the research/investigation task under #4870. I will add some additional information to that ticket when I'm back on Monday, and we may look to bring it in to a future sprint.

Therefore, we may want to park this ticket/feature for the time being, but we can chat next week if needed, or bring it up tomorrow at standup with Loren and Lise.

cc: @liseandtea @lmullane

divyav-aot commented 6 months ago
  1. Test different pdfs(normal pdf, pdf with comments, pdf with attachments/embed files)
  2. download harms
  3. download redline
  4. download response package
nimya-aot commented 6 months ago

Some issues with pdfs with comments in our test package. Will continue testing after fixing it on test env

nimya-aot commented 6 months ago

@KyEggleston Could you please update the AC's so I can test when fix push to test

abin-aot commented 6 months ago

Closing this task, without pushing to PROD based on he discussions on 22/DEC between @lmullane , @KyEggleston , @divyav-aot , @abin-aot