Compare the same custom field value in different issues

Vahagn Beglaryan October 21, 2021

Hello smart people.

 

How to compare the same field value in different issues? For example when issue is created, the system should look up in issues opened in the last 24 hours and if there any issue with the same field value which has triggered the rule, return us the issue and then we can set some actions.

 

If there is any method, please help.

 

Thanks in advance.

3 answers

0 votes
Nikos Sotirakos
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2024

Hello all,

 

I have a same case to create an automation rule in our company's projects. We want, if a customer creates within the same day two tickets, to be assigned both of them to the same agent to handle. Assuming that we distinct our customers with a custom field named VAT.  What the JQL query would be, in order just to check from that custom field?

0 votes
Simeon Leatherland
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 27, 2021

Hi there,

@Alex Koxaras _Relational_ is on the right track. Assuming the client will always be set on the same custom field you will be able to dynamically compare the custom field in the ticket created to issues in the JQL condition query as below.

 

Screen Shot 2021-10-28 at 9.52.12 am.pngPlease let me know if you have any further questions.

Cheers,
Simeon

Vahagn Beglaryan October 27, 2021

Hi dear Simeon,

 

Thanks for your reply, Jira should look up and compare the custom field value not in trigger issue but in issues which were opened in the last 24 hours.

 

example

 

We have a ticket with customfield a = 1 which is created now (key =test-1)

 

1. after 12 hours a new ticket (key = test-2) is created with the same  customfield a = 1 and automation should take actions. (because there was a ticket with the same cf value and opened during last 24hours)

 

2. in the same time an other ticket (key = test-3) is created and customfield a = 2 , then the automation shouldn't work. (because there was not any ticket with the same cf value in the last 24 hours)

 

Thanks in advance

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 21, 2021

Hi @Vahagn Beglaryan and welcome to the community!

WHy you don't use a Jira Automation (if you have it installed on your instance)?

  • Trigger "On create issue"
  • IF statement with JQL
  • Some action

Screenshot 2021-10-22 095840.png

This is quite a simple rule, but I don't know if you has something else in your mind. 

Vahagn Beglaryan October 22, 2021

Hi Alex, thanks for the reply. It doesn't solve our problem as we want to use it with custom fields. For example, when created an issue with cf xxxx value yyyy, the rule should look up if there is any ticket created in the last 24 hours with the same cf xxxx value yyyy, *values* can be different.

Vahagn Beglaryan October 22, 2021

if look up cf value equals created issue cf value the returns true

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 22, 2021

Hi @Vahagn Beglaryan apart from the fact that I've forgotten to put the time constraint of the issue creation, which would be the following:

clients = "SPEK" AND (created >= -24h AND created <= now())

I'm not sure I understand what exactly you want to search. You mean that you want to search for an array of values?

Vahagn Beglaryan October 24, 2021

Hi dear @Alex Koxaras _Relational_

The question is that our "clients" can be different,

 

Client "a" opened a ticket, system should check if there is a ticket opened in the last 24 hours by client "a" and should take an action,

 

Clients can be different, so "a"=x, we can't set clients custom field in automation, there can be different values.

 

Thank you.

Like Dimitrios Moschovitis likes this

Suggest an answer

Log in or Sign up to answer