-
Notifications
You must be signed in to change notification settings - Fork 124
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
Depositing a work with past embargo gives no id error #4833
Comments
@jeremyf i wonder if you could take a look at this one? i noticed that the new |
This commit serves two purposes: 1) First, and most important, it fixes #4833 2) Second, it unifies the logic for determining the ids More on 4833 (in case you don't have access to Github) The observed error is as follows: > Depositing a work with past embargo gives no id error > > Depositing a work with an embargo date in the past gives an "No ID > provided for ActiveFedora::Base" error. > > Expected Behavior: Depositing a work with a past embargo should fail > to be created and entered information should be preserved In debugging the application, the `@object.member_of_collection_ids` was the following: `["", "admin_set/default"]` That appears to come from the form submitting a select box that has no selected value (e.g., the `""` value). I verified this logic change by UI interaction.
This documentation reflects some of what I worked through when testing a bug fix for #4833. My intention is to continue working on this code, but only after a consultation.
Prior to this commit, we were not verifying that a user's input for a release_date was in fact a parseable date. Chrome and Firefox apply a date picker "widget" that enforces entries for a `type="date"`. However, Safari does not. Closes #4757 Note, to test this in the UI requires a fix for #4833. That fix, at the time of crafting this commit message, can be seen at PR #4885.
Prior to this commit, we were not verifying that a user's input for a release_date was in fact a parseable date. Chrome and Firefox apply a date picker "widget" that enforces entries for a `type="date"`. However, Safari does not. Closes #4757 Note, to test this in the UI requires a fix for #4833. That fix, at the time of crafting this commit message, can be seen at PR #4885.
…past-embargo-gives-no-id-error Gh 4833 depositing a work with past embargo gives no id error
This commit serves two purposes: 1) First, and most important, it fixes #4833 2) Second, it unifies the logic for determining the ids More on 4833 (in case you don't have access to Github) The observed error is as follows: > Depositing a work with past embargo gives no id error > > Depositing a work with an embargo date in the past gives an "No ID > provided for ActiveFedora::Base" error. > > Expected Behavior: Depositing a work with a past embargo should fail > to be created and entered information should be preserved In debugging the application, the `@object.member_of_collection_ids` was the following: `["", "admin_set/default"]` That appears to come from the form submitting a select box that has no selected value (e.g., the `""` value). I verified this logic change by UI interaction.
This documentation reflects some of what I worked through when testing a bug fix for #4833. My intention is to continue working on this code, but only after a consultation.
Prior to this commit, we were not verifying that a user's input for a release_date was in fact a parseable date. Chrome and Firefox apply a date picker "widget" that enforces entries for a `type="date"`. However, Safari does not. Closes #4757 Note, to test this in the UI requires a fix for #4833. That fix, at the time of crafting this commit message, can be seen at PR #4885.
Tested in Nurax with a work that had a passed embargo date. received error: |
Looking at Nurax as of 2021-04-29, the SHA is b034218. And based on footer, Nurax tracks to the Which has the following permission logic: hyrax/app/services/hyrax/edit_permissions_service.rb Lines 167 to 181 in b034218
My changes were from ab6c756 Which look as follows: hyrax/app/services/hyrax/edit_permissions_service.rb Lines 169 to 177 in ab6c756
Below is the log, at the end of the log is the commit that Nurax is on. At the beginning of the log are all of the commits that are in the * ab6c75616 — Merge pull request #4885 from samvera/gh-4833-depositing-a-work-with-past-embargo-gives-no-id-error Daniel Pierce, (2021-04-26) (HEAD -> main, origin/main)
|\
| * 35af65db1 — Refactoring to extract inner block logic Jeremy Friesen, (2021-04-24)
| * 22c888138 — Factoring from ActiveFedora::Base to query_service Jeremy Friesen, (2021-04-24)
| * d2ddfd793 — Renaming local variable for clarity Jeremy Friesen, (2021-04-24)
| * 657ef7c83 — Documenting spot to remove ActiveFedora::Base call Jeremy Friesen, (2021-04-23)
| * 696da5dbb — Removing redundant `.any?` check Jeremy Friesen, (2021-04-23)
| * c97c31fc6 — Compacting array building logic Jeremy Friesen, (2021-04-23)
| * 76c68fb1f — Renaming method to better reflect return value Jeremy Friesen, (2021-04-23)
* | 17e3da911 — Merge pull request #4891 from samvera/solr-configset Jeremy Friesen, (2021-04-26)
|\ \
| * | 91201a0d2 — give useful output when the Solr ConfigSet can't upload with auth tamsin johnson, (2021-04-26)
|/ /
* | 6f5af1efd — Make dassie sidekiq depend on services Daniel Pierce, (2021-04-22)
* | c18846c04 — Adding TROUBLESHOOTING section for CONTAINERS.md Jeremy Friesen, (2021-04-22)
* | e810cba17 — chart: readd support for kubernetes versions before 1.19 tamsin johnson, (2021-04-22)
|/
* 52b2934c6 — allow the SolrCloud assign-configset utility to create collections tamsin johnson, (2021-04-21)
* b034218b8 — chart: populate secrets and env when Minio is used tamsin johnson, (2021-04-20) |
Nurax dev is not pulling from main. Testing is on hold until new code is deployed. |
I can verify this is working on a local hyrax app so once Nurax-dev is pulling from main again we can verify there and close this issue. |
Prior to this commit, we were not verifying that a user's input for a release_date was in fact a parseable date. Chrome and Firefox apply a date picker "widget" that enforces entries for a `type="date"`. However, Safari does not. Closes #4757 Note, to test this in the UI requires a fix for #4833. That fix, at the time of crafting this commit message, can be seen at PR #4885.
Prior to this commit, we were not verifying that a user's input for a release_date was in fact a parseable date. Chrome and Firefox apply a date picker "widget" that enforces entries for a `type="date"`. However, Safari does not. Closes #4757 Note, to test this in the UI requires a fix for #4833. That fix, at the time of crafting this commit message, can be seen at PR #4885.
Prior to this commit, we were not verifying that a user's input for a release_date was in fact a parseable date. Chrome and Firefox apply a date picker "widget" that enforces entries for a `type="date"`. However, Safari does not. Closes #4757 Note, to test this in the UI requires a fix for #4833. That fix, at the time of crafting this commit message, can be seen at PR #4885.
This is still giving an error on nurax-dev but it seems to be a different error than the original report: ActionController::UrlGenerationError in Hyrax::GenericWorks#create See attached PDF file for full stack trace. |
@jlhardes I believe the new error relates to #4889. Based on the exception, it looks like you're running SHA ff0986b which does not include 840a08f. Below is the log of the * a8597884e — Merge pull request #4909 from samvera/gh-4900-edit-form-error-for-valkyrie Jeremy Friesen, (2021-05-04) (HEAD -> main, origin/main)
|\
| * 01ecf2692 — Adding permision_populator to change set Jeremy Friesen, (2021-05-04)
|/
* 9d51cb1fd — Adjusting lease/embargo_enforced helper logic Jeremy Friesen, (2021-05-04)
* 625a1a9eb — Adding rendering of lease related error messages Jeremy Friesen, (2021-05-04)
* 840a08ff8 — Fixing rendering logic for visibility component Jeremy Friesen, (2021-05-04)
* 7fe7786c6 — Ensuring non-parseable date bubbles up to UI Jeremy Friesen, (2021-05-04)
* ff0986b0f — Merge pull request #4908 from samvera/valkyrie-member-presenter Jeremy Friesen, (2021-05-04)
* 28f2086a6 — support full `MemberPresenterFactory` API in `PcdmMemberPresenterFactory` tamsin johnson, (2021-05-03)
* c08983cf5 — support member order in Valkyrie MemberPresenterFactory tamsin johnson, (2021-05-03)
* e78d3b24a — add a MemberPresenterFactory implementation that supports valkyrie tamsin johnson, (2021-05-03) |
Tested again on nurax-dev now that it is fully updated with all changes for this fix and it works as expected (red alert message that date needs to be in the future and new work is not saved and edited work is not saved). This is done! |
Descriptive summary
Depositing a work with an embargo date in the past gives an "No ID provided for ActiveFedora::Base" error.
https://nurax-dev.curationexperts.com/concern/generic_works?locale=en
Expected behavior
Depositing a work with a past embargo should fail to be created and entered information should be preserved (per #3978 )
Actual behavior
The user receives an error message.
Steps to reproduce the behavior
Related work
Link to related tickets or prior related work here.
The text was updated successfully, but these errors were encountered: