Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I juse a JQL query to find matching field values?

Bailey Hecksel March 22, 2023

I'd like to create a filter that finds issues where X field value is the same as Y field value.

I have two fields, "Reporter" and "Direct Manager" that are tied into a workflow. Both of these fields are user pickers and it's possible for users to set themselves for both the Reporter and Direct Manager fields. The Direct Manager field is what the workflow pulls an approver from. Since the Reporter cannot approve their own ticket, when they select themselves as both the Reporter and Direct Manager it get's stuck until an agent manually updates the Direct Manager field to someone else.

I'd like to setup a filter that shows me all tickets where the field value for Reporter is the same as the field value for Direct Manager.

I've done some searching, but haven't found a good answer. Paid add-ons are not an option.

Hopefully the above makes sense. Any help would be appreciated!

1 answer

1 accepted

3 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2023

Hello @Bailey Hecksel 

Without a third party app you can't write a JQL that will directly compare two fields.

You could set up an Automation Rule to find such tickets. There are several different ways you could set up such a rule.

1. You could have a scheduled rule that retrieves all the issues in the specified that have changed since the last time the rule ran. Follow that with an Advanced Compare to compare one field to the smart value of the other field. If they are the same, take some action (i.e. send an email)

2. You could have a custom field that keeps track of whether or not the two fields have the same value. Use an Automation rule to compare the two fields any time either one is changed. If they are the same, set the custom field to True/Yes/1. If they are not the same set the custom field to False/No/0. Then you can use that custom field in a filter.

Bailey Hecksel March 23, 2023

Thanks for the options, Trudy!

Suggest an answer

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

Atlassian Community Events