Skip to content

Efflux: Process Management: Enable transition chaining (A→B→C without refresh)#765

Open
eyazi wants to merge 1 commit intoznuny:devfrom
eyazi:patch-1
Open

Efflux: Process Management: Enable transition chaining (A→B→C without refresh)#765
eyazi wants to merge 1 commit intoznuny:devfrom
eyazi:patch-1

Conversation

@eyazi
Copy link
Copy Markdown
Contributor

@eyazi eyazi commented Jan 28, 2026

Proposed change

Enable automatic transition chaining in Process Management.

Currently, when a process ticket transitions from Activity A to Activity B, and the conditions for B→C are already met, the ticket stops at B. The user must reload the page for the next transition to be evaluated.

Root cause: The TicketProcessTransitions event handler uses a simple "already processed" flag per ticket, blocking all subsequent transition evaluations within the same request.

Solution: Replace the boolean flag with a visited-activities set. This allows chained transitions (A→B→C) while still preventing actual loops (A→B→A).

Scenario Before After
A→B→C chain Stops at B Continues to C
A→B→A loop Stops at B Stops at B (loop detected)

Type of change

1 - 🚀 feature

Additional information

  • Original loop protection (bug#9748) is preserved but refined
  • No configuration changes required
  • Backwards compatible

Test process: Import the attached Export_PR_Transition_Chaining.yml via Admin → Process Management. Create a process ticket, select any queue, set state to "closed successful", and submit. The ticket should progress directly to "Completed" without page refresh.

Checklist

  • The code change is tested and works locally.(❗)
  • There is no commented out code in this PR.(❕)
  • You improved or added new unit tests.(❕)
  • Local ZnunyCodePolicy passed.(❕)
  • Local UnitTests / Selenium passed.(❕)
  • GitHub workflow CI (UnitTests / Selenium) passed.(❗)

Allow process tickets to chain through multiple activities in a single
request when all transition conditions are met.

Previously, the event handler used a simple "already processed" flag
per ticket, blocking all subsequent transition evaluations. This
required manual page refreshes to progress through consecutive
activities even when conditions were already satisfied.

The fix replaces the boolean flag with a visited-activities set,
allowing A→B→C chains while still preventing A→B→A loops.
@dignin dignin self-assigned this Feb 13, 2026
@dignin dignin added the 2 - clarification The issue or pull requests needs more information. label Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 - clarification The issue or pull requests needs more information.

Development

Successfully merging this pull request may close these issues.

2 participants