Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't allow ticket to transition until code review is complete

Trenton Stutz November 12, 2025

I created a new user lookup field called 'Code Reviewer'. I also have a workflow status called 'Code Review'.

If the 'Code Reviewer' field is not empty, I want to require the ticket to go to the 'Code Review' status before the status gets set to closed.

If the 'Code Reviewer' field is empty, I don't want to require the ticket to go to the 'Code Review' status. It can go straight to closed.

How do I do this with workflow automation or global automation rules?

2 answers

1 accepted

2 votes
Answer accepted
yqiao
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 12, 2025

Hey I think you can try with 2 diff ways:

1. Use Workflow Conditions

Jira workflows let you control which transitions are available based on field values. In your case, you want to prevent tickets from moving directly to “Closed” if the “Code Reviewer” field is filled out, unless they’ve gone through “Code Review.”

  Here’s a way to do it:

  • Edit your workflow (Project settings → Workflows).

  • Find the transition that goes to “Closed.”

  • Add a Condition to this transition:

    • If your Jira supports “Value Field” conditions (like in Jira Cloud or with certain workflow apps), set it so that the transition to “Closed” is only available if either:

      • The “Code Reviewer” field is empty, or

      • The current status is “Code Review” (i.e., the issue has passed through that status).

  • If you can’t do this natively, you might need a marketplace app like
    Jira Misc Workflow Extensions (JMWE) | Atlassian Marketplace or ScriptRunner for Jira | Atlassian Marketplace to add more advanced workflow conditions.


2. Using Automation Rules

If you prefer automation, you can set up a rule to catch when someone tries to close a ticket:

  • Go to Project settings → Automation.

  • Create a rule:

    • Trigger: Issue transitioned to “Closed”

    • Condition: If “Code Reviewer” is not empty and the previous status was not “Code Review”

    • Action: Reopen the issue, add a comment, or send a notification explaining that code review is required.

This doesn’t block the transition, but it can “bounce” the issue back and let the user know what’s missing.

Trenton Stutz November 13, 2025

Thanks so much! I was able to get this figured out now using the automation rules. Unfortunately, our Jira version seems to have some limitations with the workflow conditions so I wasn't able to figure it out using those.

0 votes
Trenton Stutz November 13, 2025

Thanks so much! I was able to get this figured out now using the automation rules. Unfortunately, our Jira version seems to have some limitations with the workflow conditions so I wasn't able to figure it out using those.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events