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

IQSS/11142 show replace in file differences #11145

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

qqmyers
Copy link
Member

@qqmyers qqmyers commented Jan 9, 2025

What this PR does / why we need it: On the file page, the version table did not show when one file replaced another (it just showed No changes associated with this version. Now it shows:
image

Which issue(s) this PR closes:

Special notes for your reviewer: The fix for this was rather trivial, just turning on existing functionality by adding a details=true flag. However, in fixing that I discovered:

  • that adding free-form provenance to a file causes the dataset version table and difference api to fail due to a null pointer - I fixed that in this PR,
  • that despite being almost the same code, there is a separate FileVersionDifference class that is called from the FilePage. W.r.t. the SPA, I think the code in the FilePage that figures out which FileMetadata/DataFile to compare will need to be moved to a new API call, but it might be possible to then just use the code in DatasetVersionDifference instead to allow the other class to be deprecated. I did not dig fully into this, so it's possible that there are other differences I missed,
  • The file-versions.xhtml has several cut/paste ~errors from being copied from the dataset-level code. Things like the method in
    actionListener="#{FilePage.compareVersionDifferences()}">
    doesn't exist, the check at
    <p:column selectionMode="multiple" class="col-select-width text-center" rendered="#{DatasetPage.compareVersionsCount > 2}"/>
    references the DatasetPage, and the detailsBlocks referenced in
    oncomplete="PF('detailsBlocks').show();post_differences();"
    only exists on the dataset page. None of these appear to be fatal - but my guess is that they probably cause there to be no checkbox column through which one could compare two versions and see the details (hence the details flag). Doesn't seem like anything worth fixing given just using details=true in the table is probably good enough, but again the SPA might want to decide whether the file version table should work more like the dataset-level one than it does/can share more code, etc.

Suggestions on how to test this:
Create/publish a dataset with a file, replace the file, verify that the file page version table notes the change.
Add a free-form provenance note to the file, check that the save succeeds/the dataset page is still viewable, etc. (allowing free-form provenance is a flag that may need to be set on the test machine).

Does this PR introduce a user interface change? If mockups are available, please link/include them here: In the old table, a file that was replaced, and had a description change just shows as
image

  • this is QDR so slightly different styling.

Is there a release notes update needed for this change?: included.

Additional documentation:

@qqmyers qqmyers added Size: 3 A percentage of a sprint. 2.1 hours. GDCC: DANS related to GDCC work for DANS labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GDCC: DANS related to GDCC work for DANS Size: 3 A percentage of a sprint. 2.1 hours.
Projects
Status: Ready for Triage
Development

Successfully merging this pull request may close these issues.

Changes in file do not show up in File version history
1 participant