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

How to build an automation that checks for duplicate using custom field

Bianca Russell March 5, 2024

I have a custom text field for Customer Ref and want to use this field when an issue is created to look in other issues in my project for instances of that same customer ref.

In this way I hope to spot historic issues that relate to the new issue my customer has submitted via a portal. By matching this reference number. 

Trigger issue created (issues are created via portal by our customers and they fill in the Customer Ref)

Compare the custom field {{issue.customfield_12345}} (I have the id)

Look in text ~ (I want to search historic issues in both Summary and this custom field)

Required result for a match would be to get an internal comment that a match was found - bonus points to return the matching issue keys in the comment. 

How do I do this lookup and match in automation?

2 answers

0 votes
Bianca Russell March 5, 2024

UPDATE: I think I've figured this out. 

When I created a test issue there was no comment immediately but after I checked the audit log for the rule - which said the rule was successful - and went back to the new issue, the comment was there! Here's what I created. I'm guessing there was a delay in Jira getting the comment posted. 

Rule.png

0 votes
David Nickell March 5, 2024

It almost sounds like your text field should be a custom label field instead.  This makes more sense if the Customer Reference is either a number or some simple text. 

  • The label field has type ahead so once a label has been added once, the next issue will have access to the same value.
  • Labels cross projects whereas other fields (components for example) do not.
  • A label field would give you immediate visibility to all issues with that same label. 

I recommend a new label field (Customer Reference) instead of using the "Out of the box" label field though I think either would work.

You could test this concept using the "out of the box" label field right now. If you like its behavior you can get your custom field created,

For conversion, use a REST API Get Call call to pull the values of your current text field out for each issue.  Then use a custom field PUT call to update the labels on existing issues.

Hope this helps or at least provides an alternative.

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