After site import, workflow condition got updated to a different condition on Cloud

XMLWordPrintable

    • 1
    • Severity 3 - Minor
    • 1

      Issue Summary

      "Hide From User Condition" on Jira on-prem got updated to Always False Condition", after the site import.

      Steps to Reproduce

      1. On Jira on-prem, create a project
      2. Update the project's workflow and add "Hide transition from user" condition to the workflow
      3. Publish the workflow
      4. Create a site backup and import it into Cloud

      Expected Results

      "Hide transition from user" condition retains as "Hide From User Condition" on Cloud.

      Actual Results

      "Hide transition from user" condition is showing as "Always False Condition" on Cloud.

      Additional notes:

      • On Jira Cloud, there are "Always False Condition" and "Hide From User Condition" as per Configure advanced issue workflows - Conditions
        • When you export the workflow in XML, you will see they are recorded as follows:
          --Always False Condition
                    <condition type="class">
                      <arg name="class.name">com.atlassian.jira.workflow.condition.AlwaysFalseCondition</arg>
                    </condition>
          
          --Hide From User Condition
                    <condition type="class">
                      <arg name="class.name">com.atlassian.jira.workflow.condition.RemoteOnlyCondition</arg>
                    </condition>
          
      • On Jira on-prem, there's only "Hide transition from user" condition. "Always False Condition" condition isn't supported.
        • When you export the workflow in XML, you will see "Hide transition from user" condition is recorded as follows:
                        <condition type="class">
                          <arg name="class.name">com.atlassian.jira.workflow.condition.AlwaysFalseCondition</arg>
                        </condition>
          

          This is the same argument name as "Always False Condition" on Jira Cloud

      Workaround

      Manually update the workflow conditions after the migration.

      • SQL to identify the affected workflows and transitions:
        select * from (select t.*, jw.workflowname,  unnest(xpath('//action[@name="' || t.action || '"]/restrict-to/conditions/condition/arg[@name="class.name"]/text()', 
                     (regexp_replace(descriptor, '\<\![^\<]+\>', ''))::xml)) as conditions 
        from jiraworkflows jw
        join (select id, unnest(xpath('//*/action/@name',  (regexp_replace(descriptor, '\<\![^\<]+\>', ''))::xml)) as action from jiraworkflows) t on t.id = jw.id ) a 
        where conditions::text like '%com.atlassian.jira.workflow.condition.AlwaysFalseCondition%';
        

            Assignee:
            Unassigned
            Reporter:
            Ting
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: