? bug PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar kochinc
kochinc
3 Oct 2023

Pull Request for Issue #42031.

Summary of Changes

Restructure codes in function getValidTransition() in file libraries/src/Workflow/Workflow.php so that it works with PostgreSQL.

Testing Instructions

It needs to use a PostgreSQL database to reproduce the problem.

  1. Enable Workflow.
  2. From left menu, select Content -> Articles.
  3. From the Stage column, click on one of the item to change transition.

Actual result BEFORE applying this Pull Request

An error has occurred.
42601 42601, 7, ERROR: syntax error at or near "WHERE" LINE 5: WHERE "t"."id" = $1 AND "t"."workflow_id" = "w"."id" AND "t"... ^

Expected result AFTER applying this Pull Request

No error returned and new transition is correctly set.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar kochinc kochinc - open - 3 Oct 2023
avatar kochinc kochinc - change - 3 Oct 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Oct 2023
Category Libraries
avatar kochinc kochinc - change - 3 Oct 2023
Labels Added: PR-4.4-dev
avatar richard67 richard67 - change - 4 Oct 2023
The description was changed
avatar richard67 richard67 - edited - 4 Oct 2023
avatar richard67 richard67 - test_item - 4 Oct 2023 - Tested successfully
avatar richard67
richard67 - comment - 4 Oct 2023

I have tested this item ✅ successfully on 73e5726

The PR fixes the issue for PostgreSQL, and on MySQL it works as well as before. I've tested both.

There are 2 deprecated warnings in PHP (using PHP 8.1.2), but they happen also without this PR in the same way. This PR just makes them appear on PostgreSQL, too, because the issue doesn't happen anymore so the transition takes place.


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

avatar alikon alikon - test_item - 4 Oct 2023 - Tested successfully
avatar alikon
alikon - comment - 4 Oct 2023

I have tested this item ✅ successfully on 73e5726


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

avatar alikon alikon - change - 4 Oct 2023
Status Pending Ready to Commit
avatar alikon
alikon - comment - 4 Oct 2023

RTC


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

avatar kochinc kochinc - change - 5 Oct 2023
Labels Added: ? bug
avatar richard67
richard67 - comment - 5 Oct 2023

@kochinc There is no need to update your branch when there are no conflicts shown.

avatar HLeithner HLeithner - change - 24 Oct 2023
Title
Proposed fix for Workflow transition error
[4.4] Proposed fix for Workflow transition error
avatar HLeithner HLeithner - edited - 24 Oct 2023
avatar MacJoom MacJoom - change - 27 Oct 2023
Labels Added: ?
Removed: ?
avatar MacJoom MacJoom - change - 29 Oct 2023
Labels Added: ?
Removed: ?
avatar MacJoom MacJoom - change - 30 Oct 2023
Labels Added: ?
Removed: ?
avatar Quy Quy - change - 30 Oct 2023
Labels Added: ?
Removed: ?
avatar MacJoom MacJoom - change - 30 Oct 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-10-30 21:27:11
Closed_By MacJoom
Labels Added: ?
Removed: ?
avatar MacJoom MacJoom - close - 30 Oct 2023
avatar MacJoom MacJoom - merge - 30 Oct 2023

Add a Comment

Login with GitHub to post a comment