Forums

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

JSM Automation rule issue with status not being found

jesse.hogan May 26, 2023

Hi,

 

I created an automation rule for when a ticket remains In an On Hold state (using the On Hold status) for 5 days without an update, this rule will email the Assignee. The problem I am having is that the JQL query is erroring out saying that "The value 'On Hold' does not exist for the field 'statusCategory'." The On Hold status does exist, and is in use in a workflow I created. The JQL query is: updated <= startOfDay(-5d) AND statusCategory != "On Hold"

If I change On Hold to In Progress (another status) it works, but if I create a new status and try it, it does not work. 

 

Thanks for any assistance you can provide.

2 answers

1 accepted

3 votes
Answer accepted
Trudy Claspill
Community Champion
May 26, 2023

Hello @jesse.hogan 

Welcome to the Atlassian community.

Addressing the error you get in your rule:

There are two different fields related to Status. They are Status and Status Category.

"Status" is the field that holds the current status assigned to an issue. The values you see in the Workflow are stored in the "Status" field.

"Status Category" is the grouping to which each Status value is assigned. There are three Status Categories:

  • To Do - status values in this category show as a gray lozenge
  • In Progress - status values in this category show as a blue lozenge
  • Done - status values in this category show as a green lozenge

If you want to search for issues in a specific status (i.e. 'On Hold') you need to use the "status" field in your JQL:

updated <= startOfDay(-5d) and status != "On Hold"

You can use the "Status Category" field in your JQL as a short hand to reference all statuses in a particular category. For instance if you wanted to find all issues that are assigned a green lozenge status regardless of the actual word for that status (i.e. Done, Closed, Completed, Rejected) then you could use the Status Category field and the appropriate one of the three values I mentioned above:

statuscategory = Done

 

If you have additional problems with your rule after you update your JQL, in your next reply please post screen images to show the complete rule you have constructed, and a screen image that shows the rule's Audit Log details for an execution of the rule where you didn't get the results you expected.

jesse.hogan May 26, 2023

Wow, thank you very much for your thorough reply. That worked!! This is my first time using JQL queries besides some very limited searches. Thanks again.

Like # people like this
1 vote
jesse.hogan May 26, 2023

Interestingly, this applies to every custom status I have created and exists in a workflow. Only predefined stuff like In progress works.

Suggest an answer

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

Atlassian Community Events