? Language Change Maintainers Checked PR-4.3-dev ? Pending

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
17 Oct 2020

Summary of Changes

When trying to unpublish/trash/delete a workflow/stage currently the joomla plugins has a check implemented to prevent the status change if there are items (articles) assigned.

This checks are broken and should be fixed with this PR

Testing Instructions

Build different scenarios like 2 workflows one assigned to articles, one not. Try to unpublish/trash both workflows. If successful switch places (first workflow has no items assigned).

Same for stages.

Also try to delete assigned workflows.

Actual result BEFORE applying this Pull Request

Sometimes you can delete workflow/stages with items assigned. Sometimes you can't trash workflows although no items are assigned.

Expected result AFTER applying this Pull Request

Not possible anymore to trash workflows/stages when articles are assigned.

avatar bembelimen bembelimen - open - 17 Oct 2020
avatar bembelimen bembelimen - change - 17 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Oct 2020
Category Front End Plugins
avatar karo3 karo3 - test_item - 17 Oct 2020 - Tested unsuccessfully
avatar karo3
karo3 - comment - 17 Oct 2020

I have tested this item ? unsuccessfully on 753a0a6

Inconsistent behavior:

If you mark a stage/workflow that is not in use and not default and one that is default and want to delete both, he deletes one stage
If you mark a stage/workflow that is not in use and not default and one that is in use and want to delete both, it does not delete any stage
If you mark a stage/workflow that is not in use and not default and one that is default AND is in use and wants to delete both, he deletes one stage


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31120.

avatar chmst chmst - change - 31 Jan 2022
Labels Added: ? ?
Removed: ?
avatar HLeithner
HLeithner - comment - 27 Jun 2022

This pull request has automatically rebased to 4.2-dev.

avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar rdeutz rdeutz - change - 21 Oct 2022
Title
[4.0] Fix workflow/stage deletion prevention
Fix workflow/stage deletion prevention
avatar rdeutz rdeutz - edited - 21 Oct 2022
avatar rdeutz rdeutz - change - 21 Oct 2022
Labels Added: PR-4.3-dev ?
Removed: ? ?
avatar rdeutz
rdeutz - comment - 21 Oct 2022

@bembelimen should we close this because of the great success with this change :-)

avatar bembelimen bembelimen - change - 21 Oct 2022
Labels Added: Maintainers Checked
avatar joomla-cms-bot joomla-cms-bot - change - 21 Oct 2022
Category Front End Plugins Administration Language & Strings Front End Plugins
avatar bembelimen
bembelimen - comment - 21 Oct 2022

I have tested this item red_circle unsuccessfully on 753a0a6Inconsistent behavior:

If you mark a stage/workflow that is not in use and not default and one that is default and want to delete both, he deletes one stage If you mark a stage/workflow that is not in use and not default and one that is in use and want to delete both, it does not delete any stage If you mark a stage/workflow that is not in use and not default and one that is default AND is in use and wants to delete both, he deletes one stage
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31120.

So updated the PR, it should only unpublish/trash/delete anything of all of the selected items have no assignments.

Please test again.

avatar bembelimen bembelimen - change - 21 Oct 2022
Title
Fix workflow/stage deletion prevention
Fix workflow/stage unpublish/trash/deletion prevention
avatar bembelimen bembelimen - edited - 21 Oct 2022
avatar bembelimen bembelimen - change - 21 Oct 2022
The description was changed
avatar bembelimen bembelimen - edited - 21 Oct 2022
avatar bembelimen bembelimen - change - 22 Oct 2022
Labels Added: Language Change
avatar bembelimen bembelimen - change - 22 Oct 2022
The description was changed
avatar bembelimen bembelimen - edited - 22 Oct 2022
avatar chmst
chmst - comment - 22 Oct 2022

Line 559

if (!$this->_canDeleteStage($pk)) {

has to be changed with _workflowNotUsed

avatar bembelimen
bembelimen - comment - 22 Oct 2022

Thx

avatar drmenzelit
drmenzelit - comment - 22 Oct 2022

I have tested this item successfully on ecc3478


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31120.

avatar drmenzelit drmenzelit - test_item - 22 Oct 2022 - Tested successfully
avatar chmst
chmst - comment - 22 Oct 2022

I have tested this item successfully on ecc3478


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31120.

avatar chmst chmst - test_item - 22 Oct 2022 - Tested successfully
avatar brianteeman
brianteeman - comment - 22 Oct 2022

My bad. It should be "in a published"

avatar chmst chmst - change - 23 Oct 2022
Status Pending Ready to Commit
avatar chmst
chmst - comment - 23 Oct 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31120.

avatar rdeutz rdeutz - change - 23 Oct 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-10-23 10:53:10
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 23 Oct 2022
avatar rdeutz rdeutz - merge - 23 Oct 2022

Add a Comment

Login with GitHub to post a comment