[18.0][FIX] document_page: Don't change last history name and summary…#565
[18.0][FIX] document_page: Don't change last history name and summary…#565
Conversation
pedrobaeza
left a comment
There was a problem hiding this comment.
But with this, you cannot change the head name and summary...
etobella
left a comment
There was a problem hiding this comment.
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. |
|
Yes, I know, however, this might give errors latelly. The don't changed are lost, and that is not an option. |
|
Sorry, can't quite understand what you mean. Can you please explain further? |
@etobella Can you please elaborate? |
|
@diggy128 there is an issue when you only edit one of the fields. I know that users shouldn't do it this way, but they can, so we cannot allow failires on the software and say: it is your fault because you didn't follow the expected workflow when the syatem never raises a warning. also, i can imagine cases where the user makes a change without changing the fields for a real reason (like fixing 2 typo errors in a row (message could be the same)) |
… 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.
d5ad0c4 to
5859203
Compare
|
I am baffled. I don't seem to get if the module works as it was designed or there are things that should be fixed. Throughout the years, there were a couple of things I found that didn't work as they were supposed to work:
@etobella @pedrobaeza |

… 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.