jira:workflowCondition expression is evaluated against transition-screen submitted values at execution time instead of stored issue state

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary:

      When a workflow transition has both a jira:workflowCondition and a transition screen (Request Input), Jira evaluates the condition twice:

      1. At gate-check time — correctly against the stored issue state (determines whether to show the transition)
      2. At execution time — incorrectly against the merged in-flight issue state (i.e. with the screen’s submitted values already applied)

      This causes transitions to fail with "Action N is invalid" whenever a user fills in a field on the transition screen that the condition checks — even though the condition was true when the transition was offered. The same pattern worked correctly under the Connect jiraWorkflowConditions module. This is a regression and a platform bug — the condition evaluation at execution time should use the stored issue state, not the submitted values (that is the role of validators, which have originalIssue for this purpose).

      This was independently reproduced with a fresh native Forge app (no Connect migration involved), confirming it is not specific to Connect→Forge migration or any third-party app.

      Steps to Reproduce

      • Create a Number custom field named Budget (e.g. customfield_10778)
      • Create a transition screen (Budget Screen) containing the Budget field
      • In a company-managed project workflow, select a transition (e.g. → Done)
      • Add a Restrict Transition (Condition) using a Forge jira:workflowCondition with expression:
      issue.customfield_10778 == null
      • Add a Request Input (Transition Screen) → select Budget Screen
      • Publish the workflow
      • Create a new issue — leave Budget empty (null)
      • Open the issue → click the Done transition (it is visible — condition is true)
      • The Budget Screen appears → type any number (e.g. 7) → click Update

      Expected Results

      ✅ The issue transitions to Done. Budget is saved as 7.

      The condition should only gate whether the transition is offered to the user (evaluated against stored issue state). It should not be re-evaluated at execution time. If re-evaluation at execution is intended, it must use the stored issue state — not the submitted screen values.

      Actual Results

      ❌ Red banner: “Action 41 is invalid” (where 41 is the transition ID)

      The issue does not transition. Budget is not saved. The transition is rejected even though the condition was true at gate-check time (Budget was null when the transition was offered).

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Rushikesh Walke
              Reporter:
              Chandra Shekhar Pandey
              Votes:
              7 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: