-
-
Notifications
You must be signed in to change notification settings - Fork 377
[18.0][FIX] document_page: Don't change last history name and summary… #565
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
base: 18.0
Are you sure you want to change the base?
Conversation
… when creating new revision of page. Fixes an issue where editing a document.page and changing name and/or summary (to create a new revision) also changes name and summary of the history_head. draft_name and draft_summary are now computed fields (based on history_head) but have set the inverse without actually setting the value, to allow setting them when creating a new draft page. The issue is prominently evident when using document_page_approval where the name/summary for the new draft also change the last approved version (aka history_head) which should not happen.
etobella
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically makes sense
pedrobaeza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But with this, you cannot change the head name and summary...
etobella
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IT is not working....
If you write only one of the fields, the other are resetted...
In fact you can, because we set inverse on the field (even though not doing anything about it in the inverse method). If there is a history_head, then these are fetched along with content, otherwise they are kept empty. This way we always have the correct name and summary from history head, but allows to change them if we change the content |
That is how I made it work. However, especially in ISO certifications related documentation, having a document history with the same version and / or summary is wrong. |
… when
creating new revision of page.
Fixes an issue where editing a document.page and changing name and/or summary (to create a new revision) also changes name and summary of the history_head.
draft_name and draft_summary are now computed fields (based on history_head) but have set the inverse without actually setting the value, to allow setting them when creating a new draft page.
The issue is prominently evident when using document_page_approval where the name/summary for the new draft also change the last approved version (aka history_head) which should not happen.