Assign to specific user if Issue Key ends with even numbers alone

Kaviraj December 10, 2019

Hi 

I have list of tickets like below

ARTPSD-34204

ARTPSD-34205, ... etc..

I would like to assign to specific user when the ticket is resolved. So i'm using Automation for JIRA plugin to do this. It's quite simple so i did it.

But the requirement is - ONLY issue key ends with even number should assign to specific user.

Ex. ARTPSD-34204, ARTPSD-34206, ARTPSD-34208 , etc...

I have tried few things, i couldn't achieve it.

Key Ends with Even.PNG

Appreciate your kind help.

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 13, 2019

Hi Kaviraj,

I see that you're using the automation for Jira plugin in order to automatically assign even numbered issues in this project to a particular user.  Your regex query is close, but I can see why this is not working.  Trying using a regular expression of

ARTPSD-[0-9]*[02468]\b

This will match all issues in that project that end with an even issuekey number.   I tested this out in my Jira Server environment and it appears to work as desired.  For background, I like to use a site called https://regexr.com/ in order to help me build my regular expressions.  It has a helpful interface so you can see which lines in the text block below will be matched so that you can create your query to match appropriately. 

Cheers,

Andy

Kaviraj December 17, 2019

Dear @Andy Heinzer 

Thanks for your response, your regular expression is working fine for me.

Although, i have checked the below expression 

ARTPSD-....2 

its working fine too. but i think this wouldn't work for more/less than 5 digit like

ARTPSD-48

ARTPSD-123456

Anyhow, i will use your logic.

 

Thanks buddy :) 

Suggest an answer

Log in or Sign up to answer