Workflow Toolbox - Set field from regexp-extracted substring of another field

We want to set a field to a datetime from an email received by JIRA. We currently have the contents of the email populating the description field. We have a regular expression to match the desired substring, but I cannot figure out how to extract that substring and populate the target field with it. It seems like everything the Workflow Toolbox does is backwards or only seemingly related to what I'm attempting to accomplish, and the language describing each post-function is difficult to digest or just plain unclear. I'm really hoping I'm just confusing myself with regards to accomplishing this, at it seems like a remarkably easy task; however, neither "Copy a parsed text to a field", "Set a field from a set of rules based on regexp", nor "Regexp renderer" appears to fit the bill.

So the question: How do I set a field to a regex-extracted substring of another field?

1 answer

1 accepted

I suggest installing Jamie Echlin's Script Runner and using it for more sophisticated post-function work. If you have some basic programming chops, you'll find yourself using it for lots of things in JIRA and dispensing with most other post-function/etc add-ons.

Here's how to do field regex copies: https://jamieechlin.atlassian.net/wiki/display/GRV/Post+Functions#PostFunctions-Copyonefieldtoanotherusingregexp

Awesome, thank you for the quick response! I'll see if our admins are cool with this.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

123 views 4 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you