Skip to content

Conversation

@ianwallen
Copy link
Contributor

This is a continuance of the work from pull request #3703 with an attempt to fix the issues raised in the pull request.
I'm not sure if I should have sent the pull request to @PascalLike github branch so that it would have been in his pull request. Since the pull request is from 2019, I thought it would be best to resubmit a new one. Would like to thank @PascalLike for the good work done on this.

Main changes include the following.

  • Removed MetadataStatusId Serialization and Deserialization and used existing format of /{metadataUuid}/status/{statusId:[0-9]+}.{userId:[0-9]+}.{changeDate}
  • Removed rollback option as a rollback is the same as a restore. Also removed logic to delete status of rollback status.
  • Renamed view buttons to view previous version and changed version and added new showStatusAfter api to support this.

The buttons now look like this.

image

Issues not addressed in this pull request

image

Also not sure where this utility should go?
Can this be done at a later time?

image

I agree with this but I think it should be looked at in a separate request. I believe the key for the status table is too large and it would be better to consolidate the key into a single unique key and then simply have a restored_from_status_id added to the table. But I believe this may require some discussion so I created a new issue #4750

Note: This pull request may conflict with #4738 - if so then I can fix the conflicts.

Antonio C and others added 6 commits November 6, 2019 14:43
…into restorehistory

# Conflicts:
#	web-ui/src/main/resources/catalog/locales/en-core.json
#	web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v390/migrate-default.sql
…xisting format of /{metadataUuid}/status/{statusId:[0-9]+}.{userId:[0-9]+}.{changeDate}

Removed rollback option as a rollback is the same as a restore.  Also removed logic to delete status of rollback status.
Renamed view to view previous version and changed version and added new showStatusAfter api to support this.
Database
Added missing fre language for insert
Move migration inserts to 3110 and also added missing translation.
…into restorehistory

# Conflicts:
#	services/src/main/java/org/fao/geonet/api/records/model/MetadataStatusResponse.java
@ianwallen
Copy link
Contributor Author

@fxprunayre, @josegar74,
Both of you had reviewed the initial code in 2019. Would you be able to review this new code and provide feedback.

Thank you

@jodygarnett
Copy link
Contributor

@ianwallen I would like to confirm how this change handles deleted records.

context: On a fork of geonetwork I have a seperate table for deleted records which captures additional details (as the record is no longer actively available).

@ianwallen
Copy link
Contributor Author

This pull request does not handle the delete logic however I have another pull request that I was planning on submitting after this one. It will handle the deletes and recovery of deletes and it will also handle the linkage for a restore operation as Francois has identified.
I could put everything all in one PR however I did not think the community wanted to review a big change. I just wanted to try to complete the request that Antoneo started in preparation for the other changes.
But I can put it all in one pull request if that is preferred.

@jodygarnett
Copy link
Contributor

It is fine to do as separate pull requests, I was just curious on your plans (and overlap with my own work).

…into restorehistory

# Conflicts:
#	web/src/main/webapp/WEB-INF/classes/setup/sql/migrate/v3110/migrate-default.sql
@jodygarnett
Copy link
Contributor

@josegar74 can you close ##3703 please, this PR replaces it.

@ianwallen
Copy link
Contributor Author

@josegar74 - I noticed that you started to review #4817. #4817 contains the same changes as this PR plus it contains the added feature to support deleted items other changes. So if you want to review that one instead - then this one can be closed.
Otherwise if you review this one then I will merge any required changes back into #4817

Sorry if this is causing confusion.

@ianwallen
Copy link
Contributor Author

@josegar74 as discussed I will close this PR and we will only review #4817

@ianwallen ianwallen closed this Oct 8, 2020
@ianwallen ianwallen deleted the restorehistory branch August 19, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants