Bug #4627
closed
[ESA] Update fails when document rev number is missing
Added by Jim Regetz almost 15 years ago.
Updated almost 15 years ago.
Description
For ESA, when the moderator action is "revise", an email is sent to the submitter. This message contains a link to edit the DP, e.g.:
http://data.esa.org/esa/cgi-bin/register-dataset.cgi?stage=modify&cfg=esa&docid=esa.62
Note that the revision number is omitted from the docid embedded in this link. After editing this document and attempting to submit it, the update step fails:
-----------------------------------------------------------------------
Failure
An error occurred. Please check the list of errors below:
- Next revision number couldn't be less than or equal 2
- Failed while updating.
Click the button below to return to the form and fill in the required fields. Do NOT use the back button on your browser. Submit the description again when you are finished.
-----------------------------------------------------------------------
As I understand it, some things we discussed:
- A quick fix would be modify the registry code so that if the rev number is missing when updating, it checks Metacat to determine the highest rev number, and then iterates that by one.
- A better (?) fix would be to make it so that requests to edit an EML doc in the registry always load the doc with the most recent revision, regardless of what rev number (if any) was given. Ideally, if a rev number other than the most current is given, the user should be duly notified (either simply told that they will be editing the newest revision rather than the one they requested, or perhaps given the option of editing the newest revision or canceling the edit request?).
Not clear whether some of this should involve changes to metacat itself rather than simply modifying the registry code.
Updated the registry code to recognize when the docid for a modify action does not have a revision. In that case, get the latest revision number from metacat and use that.
Original Bugzilla ID was 4627
Also available in: Atom
PDF