Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

upon issue creation, check if issue with customfield value already exists

Hello,

I want to link the most recent created issue, to existing issues which has the exact same value in the custom field 'serialnumber'. Which will result in linking issues with the same serialnumber.

I found below information, but I dont have a clue where to even begin. https://community.atlassian.com/t5/Jira-questions/Case-insensitive-check-script-validator-Unique-check-before/qaq-p/955531

Can my request be done with Automation?

What do I need?

1 answer

1 accepted

0 votes
Answer accepted

Hello @Koen Bruggeman ,

Thanks for reaching out and this can definitely be done with Automation Rules.

First off there are a few different concepts that I used in the example automation that can be found in the following documentation for a reference point and more detail on each action:

First I created a custom field named "Serial Number" of type "text", Noting that a text field will allow for alpha Numeric entry such as "ABC123".  Then I added it to the appropriate field configurations for the project, then I created an Issue link called "Duplicate Serial Number" as shown below:

Screen Shot 2021-05-05 at 5.30.27 PM.png         ...          Screen Shot 2021-05-05 at 5.31.34 PM.png

the Automation Rule I came up with will create variable smart values that can be used in a JQL search on a branch Rule operation, and link to matching issues found in the result set.  I set the rule up as follows:

  • When: Issue Created
  • Re-fetch issue data
    • NOTE: the re-fetch is a critical step for the follow-up JQL actions that pull any information from the current issue, as the issue data will not exist in the index until after the rule is done on a create issue trigger unless the re-fetch is added at an earlier point
  • Branch Rule - For JQL
    • Type of related issues
      • JQL
    • JQL
      • "Serial Number[Short text]" ~ "\"{{issue.Serial Number}}\"" AND KEY != {{issue.key}}
      • NOTE:  the syntax for the portion TextField ~ "\"value\"" means that the field will be exact without the end tags the value can be approximate.
    • Deselect the checkbox for the option:
      • "Only include issues that have changed since the last time this rule executed"
  • THEN: Link Issue to:
    • This Issue:
      • Existing Serial Number (Or any other desired issue link type for this operation)
    • Issue:
      • Trigger Issue

 

Screen Shot 2021-05-05 at 5.45.01 PM.png

Hope this helps and let me know if you have any additional questions.

Regards,
Earl

Hello Earl,

 

Thanks a million! Implemented and running as we speak!

Like Earl McCutcheon likes this

I also want to thank you for the great explanation of what happens and what each step does.

Very nice.

Like Earl McCutcheon likes this

Happy To Help smile

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you