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

As a Compliance officer, I can see differences between versions of SWRS reports #268

Closed
7 tasks done
matthieu-foucault opened this issue Jun 30, 2021 · 15 comments
Closed
7 tasks done
Assignees

Comments

@matthieu-foucault
Copy link
Contributor

matthieu-foucault commented Jun 30, 2021

Description:

As a Compliance officer, I can quickly see differences between version of SWRS reports within two XML files displayed side by side.

image.png

Given a report ID, we can retrieve the original XML report via the foreign keys located in the swrs_history.report table.
The XML string needs to be formatted (e.g. with https://www.npmjs.com/package/xml-formatter), its syntax highlighted (e.g. with https://prismjs.com/) prior to the diff being rendered (e.g. with https://github.com/praneshr/react-diff-viewer)

Miro board reference: CE Discovery Space

Acceptance Criteria:

In the GGIRCS app,

  • two text boxes to input the report ID
  • differences in XML text can be seen in red and green
  • indicate where the file came from, date, name of file
  • diffs can be collapsed (summarize changes toggle)
  • When you type a report into the input box - if the number is a valid ID, there is a green checkmark displayed and the XML appears automatically below.
  • If you type an invalid ID, helper text tells you it's incorrect.
  • There can be an option to reverse the order of the two files if desired.
@Dianadec
Copy link

Dianadec commented Jul 6, 2021

Are they looking for different things? Like differences in emissions? What are the specific differences? If not, a file comparison would work. We'd need to show them an example of what a diff looks like between two XML files (if they aren't familiar with the XML format it might not be the best solution).

@jaimiebutton
Copy link

User story to be validated

@Dianadec
Copy link

Q from July 27 meeting: What differences do we need to see between versions of reports?

@Dianadec
Copy link

MVP - could show ALL the differences, then they can scroll to look at the differences they actually need to see.

@rajpersram
Copy link
Member

Raj to mockup what a diff might look like (drawing on tools such as https://www.npmjs.com/package/react-diff-viewer) with emphasis on keeping it very simple in regards to the time we have available.

@matthieu-foucault
Copy link
Contributor Author

@dleard can you help @rajpersram with downloading and formatting XML files (and perhaps re-encoding them from UTF-16 to UTF-8) to see what a diff looks like.

Screenshots and/or a recording could be passed to the C&E team to show them what a diff would look like

@rajpersram rajpersram self-assigned this Aug 9, 2021
@rajpersram
Copy link
Member

rajpersram commented Aug 12, 2021

Notes from Aug 12 meeting with John showing the File and Diff image shown below File Browser and Diff.png

  • Flag not needed right now (but saw some potential usefulness. Low priority).
  • Need a way to clear all files selected.
    • Possible to show what’s been selected after you move away?
  • Would like a way to summarize changes in the color coded diffs instead of seeing the whole file.

@Dianadec
Copy link

Dianadec commented Aug 12, 2021

Feedback about flags as a feature has been captured in the card #300

Suggestion to have a way to toggle to see changes vs. the whole picture has been captured in the card #301

@Dianadec
Copy link

@rajpersram once the design is complete, can it be added to this card?

@rajpersram
Copy link
Member

rajpersram commented Aug 16, 2021

File Compare v2.3 summary off.png

File Compare v2.3 summary on.png

Report ID entered into each field, which automatically shows the diff for each on the respective left and right side. Contents can be cleared by starting a new search. The 'Summarize Changes' toggle button would either show the full documents with highlighted changes, or show just the highlighted changes on their own. Only numerical report IDs will give results (error to show on input field otherwise: "Invalid entry. Input may only contain 5 digit number.").

@matthieu-foucault
Copy link
Contributor Author

@rajpersram Now that the UX design work is done for this card, I'll move it back to the backlog

@matthieu-foucault
Copy link
Contributor Author

@dleard @naomiaro @pbastia Hey team! Can you please add your planning poker estimates with ZenHub

@dleard
Copy link
Contributor

dleard commented Aug 25, 2021

The ggircs_app user/schema needs the swrs_history / swrs_extract schemas included (with select only privileges). Work is done here:
#309

@dleard dleard self-assigned this Aug 27, 2021
@dleard dleard mentioned this issue Aug 28, 2021
1 task
@Dianadec Dianadec changed the title As a Compliance officer, I can see differences between version of SWRS reports As a Compliance officer, I can see differences between versions of SWRS reports Sep 1, 2021
@LindsayMacfarlane
Copy link

Awesome diff @dleard! Thank you for walking me through the feature and all the troubleshooting you had to do to make it work.

@LindsayMacfarlane
Copy link

Great job troubleshooting @dleard! Can't wait to get this in front of the Compliance Team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants