? ? Pending

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
28 Nov 2020

Pull Request for Issue #26595 .

Summary of Changes

After discussing with @HLeithner we decide to go for the following approach:
when workflow is active, the values from the items which are covered by the workflow plugins (in this case "state" + "featured") should not be put into the versioning table.

This happens by removing this values from the hash + the values itself via the workflow plugins.

Testing Instructions

  • Create an article
  • Change it

Actual result BEFORE applying this Pull Request

  • Values handled by the workflow are only versioned after a second save

Expected result AFTER applying this Pull Request

  • Values handled by the workflow are never versioned.
avatar bembelimen bembelimen - open - 28 Nov 2020
avatar bembelimen bembelimen - change - 28 Nov 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Nov 2020
Category Administration com_content com_contenthistory Libraries Front End Plugins
avatar brianteeman
brianteeman - comment - 28 Nov 2020

I have tested this and it does what it says but for me its a major loss of functionality to just remove the versioning of the state. I do not consider this as a fix for the release blocker.

avatar bembelimen
bembelimen - comment - 28 Nov 2020

Thank you @brianteeman for testing and giving feedback.

Do we agree, that a user should not change values which are handled by the workflow?

The issue is, that the value are not saved at all and the solution should be, that the values are saved but only recovered when the workflow is disabled?

avatar brianteeman
brianteeman - comment - 28 Nov 2020

Do we agree, that a user should not change values which are handled by the workflow?

honestly not sure. it would depend on the workflow settings

avatar richard67
richard67 - comment - 28 Nov 2020

Just by the way, the failure of system tests in Drone seems not to be related to the PR but to a problem with testing environment ("Failed to connect to 127.0.0.1 port ...: Connection refused", like we currently have it for other J4 PRs.

avatar bembelimen
bembelimen - comment - 28 Nov 2020

Do we agree, that a user should not change values which are handled by the workflow?

honestly not sure. it would depend on the workflow settings

If you disable the e.g. the publishing plugin, then it's versioned. So the settings have an impact.

avatar brianteeman
brianteeman - comment - 28 Nov 2020

Editor submits a new version. Admin check it and says no so they need to revert to the previous version

can they still do that?

avatar bembelimen
bembelimen - comment - 28 Nov 2020

Editor submits a new version. Admin check it and says no so they need to revert to the previous version

can they still do that?

Yes, they can revert every value they could also change in the normal edit form. So e.g. title, text, dates etc. but not "state" and "featured" if (!) they are enabled within the workflow.

avatar bembelimen bembelimen - change - 3 Dec 2020
Labels Added: ? ?
avatar wilsonge
wilsonge - comment - 9 Dec 2020

I'm going to merge this because this is at least more consistent. However I'm not going to close the original issue for now because potentially there could be better fixes.

Editor submits a new version. Admin check it and says no so they need to revert to the previous version

In this case if the article is already published the editor version is also live before admin review. If the article isn't live then state won't have changed. If the state has changed between the new version and the admin publishing then you're reverting multiple versions and potentially yes you wouldn't see a rollback. Potentially I guess if there is a path in workflow to revert the workflow state maybe we should execute it (or else not allow the rollback??) But super unsure which is why I'm happy to keep the existing issue open to discuss these kinds of concrete use cases.

@HLeithner also made a good point that right now hitting publish in the list view doesn't trigger versioning (I mean for sure I'd see that as a bug but...) state is already inconsistent in j3/j4 - probably just needs more work overall.

avatar wilsonge wilsonge - change - 9 Dec 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-12-09 19:52:06
Closed_By wilsonge
avatar wilsonge wilsonge - close - 9 Dec 2020
avatar wilsonge wilsonge - merge - 9 Dec 2020

Add a Comment

Login with GitHub to post a comment