Automation For Jira Regex

Raynard Rhodes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2018

My knowledge of regex is beginner...probably beyond beginner. I've been attempting to create a regex in Automation For Jira that will detect a change in component...if the component already exists then do nothing, otherwise perform an action.

 

I'm trying to complete this with three steps, first to check if the componet has NAME but is now empty, the second is to check if NAME already exists then do nothing, if NAME doesn't already exist create new issue. the 1st and 3rd works, but the middle one is giving me issues. I've attempted a bunch of different combos, but I'm at a lost.

 

2018-11-16_16-08-34.png

1 answer

1 accepted

1 vote
Answer accepted
Scott Harwood
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2018

Hi Raynard,

 

 I've been attempting to create a regex in Automation For Jira that will detect a change in component...if the component already exists then do nothing, otherwise perform an action.

Unfortunately, it is not possible. This is a limitation in Jira itself, as when your rule is being executed (triggered by an issue updated event in Jira). There is no way to get the previous value of multi-value fields (e.g components), so we cannot compare the previous value to the new value to determine if it already existed or not. The root of the issue is that multi-value fields do not provide the previous value in the changelog. You can see this if you look at the issue history of an issue, the previous value is not shown when you, for instance, add a component.

Sorry,
Scott.

Raynard Rhodes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2018

Thank you for your response. It saves me from continuing to do something that'll never work. Looks like it's another approach. Again, thank you.

Like Dave Liao likes this

Suggest an answer

Log in or Sign up to answer