Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section has use cases which that help you understand the usage of the Conditions provided by JMWE.

On this page:

Table of Contents


Current Status Condition

This condition can be used to hide/show a particular transition from the list of available workflow actions, based on the current status of the issue. 

Sample use cases:

  • (lightbulb) Block issue transition from current status to itself

    Expand
    titleSteps


    Panel
    • Add the Current status condition to all the transitions of the workflow, the issue follows.
    • On each condition select all the status(es) from the Current Status field except the current one



  • (lightbulb) Allow users to transition the issue to Approve status only when the issue is in Verified status

    Expand
    titleSteps


    Panel
    • Add the Current status condition to the transition "Approve".
    • Select "Verified" status from the "Current status" field



  • (lightbulb) Block transition to 'On Hold' status when the issue is in 'Closed' status

    Expand
    titleSteps


    Panel
    • Add the Current status condition to the transition "On Hold".
    • Select all the status(es) applicable to the current issue, except the 'On Hold' status.



...

  • (lightbulb) Hide the transition "Triage" until at least one assigned subtask is available for the issue

    Expand
    titleSteps
    • Add the Linked Issue condition to the "Triage" transition.
    • Select the issue link type is Parent Of from the Issue Link Type field.

    • Select the issue type as Sub-task

    • Select the option "At least one linked issue must satisfy the condition below"
    • Input the Jira expression:

      Code Block
      linkedIssue.assignee !=null



  • (lightbulb) Hide the "Start Progress" transition on a ticket when there is a blocking issue linked to it

    Expand
    titleSteps
    • Add the Linked Issue condition to the "Start Progress" transition.
    • Select the issue link type is blocked by from the Issue Link Type field.

    • Select the option "Every linked issue must satisfy the condition below"
    • Input the Jira expression:

      Code Block
      true



Linked Issues Status Condition

...

Build-your-own (scripted) Condition

This condition can be used to hide/show a transition based on a Jira expression

...

  • (lightbulb) Only the Reporter of the issue should be able to close the service ticket. 

    Expand
    titleSteps
    • Add the Build-your-own (scripted) condition to the Close issue transition.
    • Write this content in the Jira expression.

      Code Block
      user == issue.reporter



  • (lightbulb) Hide the transition from the current user if he does not belong to the Approvers

    Expand
    titleSteps
    • Add the Build-your-own (scripted) condition to the transition you wish to hide
    • Write this content in the Jira expression.

      Code Block
      !! issue.customfield_10002 && issue.customfield_1010010002.some(it => it == user)



  • (lightbulb) Block a specific transition when the Time to resolution is breached.

    Expand
    titleSteps
    • Add the Build-your-own (scripted) condition to the transition you wish to hide
    • Write this content in the Jira expression.

      Code Block
      !! issue.customfield_10102 && (!issue.customfield_10102.ongoingCycle || !issue.customfield_10102.ongoingCycle.breached)

      where customfield_10101 is the id of the Time to resolution field.


  • (lightbulb) Prevent the users from "Return/Exchange" on the purchase order after 15 days from the item delivery date

    Expand
    titleSteps
    • Add the Build-your-own (scripted) condition to the transition "Return/Exchange"
    • Write this content in the Jira expression.

      Code Block
      new Date().toCalendarDate().minusDays(15) < issue.customfield_10203created