[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)) |
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 |
|
@etobella @pedrobaeza |
|
/ocabot rebase |
… 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.
|
Congratulations, PR rebased to 18.0. |
5859203 to
c92e461
Compare
|
@diggy128 I understand your problems, and that makes me thing if saving document should open a popup to add this extra information... however, as I suggested before, your approach is not working as expected. |
In this case we should cater for minor changes (eg typos) carrying over the summary.
Is the expected behavior the intended behavior?
|
|
@diggy128 I don't know if this is the expected behavior, however, leaving it empty when it should be required is obviously not a better outcome. With the current situation, the current solution seems better than your proposal. Sorry if I am too direct, however, leaving space for mistakes of the users seems a worse outcome. We cannot expect that users know that they need to do everything at the same time to receive the expected outcome. That might not happen, so we need to propose something that works for them in all possible scenarios, not only on the one where everything works perfect. Even if they make it as expected, users might change the version later on because they decided to make it a major change, not a minor change, also, the summary must be kept. Personally, I think we should rethink the whole document page module to fit all the possible options, but that would require a refactoring of the module. |

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