Skip to content

BagIt Support - Improve error messages for BagIt handler #8792

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

Merged

Conversation

abujeda
Copy link
Contributor

@abujeda abujeda commented Jun 10, 2022

What this PR does / why we need it:
Improvements to the error messages for the BagIt file handler. The message location has changed from the top of the page to just underneath the file upload widget.

The message text has been updated following a review from our user testing.

Which issue(s) this PR closes:
Closes #8787

Special notes for your reviewer:
None

Suggestions on how to test this:
As only the error messages has ben updated, we need to enable the :BagItHandlerEnabled feature and use invalid BagIt packages.

To enable the feature: curl -X PUT -d 'true' http://localhost:8080/api/admin/settings/:BagItHandlerEnabled

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No UI changes. The error messages section where the errors are displayed was already in the system.

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

Additional documentation:
None

@abujeda
Copy link
Contributor Author

abujeda commented Jun 10, 2022

Sample BagIt packages useful for testing:
bagit-10-errors.zip
bagit-1-error.zip
bagit-no-errors.zip

@abujeda
Copy link
Contributor Author

abujeda commented Jun 10, 2022

New error location:

Screenshot 2022-06-10 at 11 22 01

Copy link
Contributor

@scolapasta scolapasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adaybujeda overall this looks good - my one comment is that there are several places in the tests that seem to match for specific text. I'm usually not a fan of that because if we decide to change the text for whatever reason the test will fail (when it should not) and it's usually sufficient to just confirm that an error happen (or type of error if that can be gotten from sort of enumerated list).

Could you review the tests and see if there are simplifications to be made so that it doesn't have to rely on matching specific texts?

@abujeda
Copy link
Contributor Author

abujeda commented Jul 19, 2022

Looking into it....

@abujeda abujeda force-pushed the 8787-improve-error-messages-bagit-handler branch from c7c974d to d3a15b4 Compare July 20, 2022 08:43
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 19.76% when pulling d3a15b4 on adaybujeda:8787-improve-error-messages-bagit-handler into 567e506 on IQSS:develop.

@abujeda
Copy link
Contributor Author

abujeda commented Jul 20, 2022

@scolapasta I have updated the tests that were string matching messages from the BundleUtil.
I am now checking that the expected bundle key is used instead.

Let me know if I missed any other tests.

@scolapasta scolapasta removed their assignment Jul 20, 2022
@kcondon kcondon self-assigned this Jul 22, 2022
@kcondon kcondon merged commit ba0183d into IQSS:develop Jul 22, 2022
@pdurbin pdurbin added this to the 5.12 milestone Jul 25, 2022
@scolapasta scolapasta added HDC: 2 Harvard Data Commons Obj. 2 HDC Harvard Data Commons labels Aug 1, 2022
@mreekie mreekie added the NIH OTA: 1.3.1 3 | 1.3.1 | Support software metadata | 5 prdOwnThis is an item synched from the product planning... label Dec 15, 2022
@mreekie mreekie added pm.GREI-d-1.3.1 NIH, yr1, aim3, task1: Support software metadata pm.GREI-d-1.3.2 NIH, yr1, aim3, task2: R & D phase biomedical workflows support labels Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HDC Harvard Data Commons HDC: 2 Harvard Data Commons Obj. 2 NIH OTA: 1.3.1 3 | 1.3.1 | Support software metadata | 5 prdOwnThis is an item synched from the product planning... pm.GREI-d-1.3.1 NIH, yr1, aim3, task1: Support software metadata pm.GREI-d-1.3.2 NIH, yr1, aim3, task2: R & D phase biomedical workflows support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request/Idea: Improve error messages for BagIt handler
6 participants