Extract a portion from an “User Picker (single user)” custom field by Jira automation

Jira automation offers a vast majority of opportunity of tweaking Issues. One of them which is actually easy but a bit secret function is to extract a portion of a text.

In my example, I tried to extract the string from a user name between parenthesis on all returned Issues by jql for a custom field in my project .

The key is to use the following

{{issue.(your customfield_ID).displayName.substringBetween("(", ")") }}

Just replace (your customfield_ID) whatever your custom field ID is. (i.e customfield_15200)

Let’s gather this with an automation.

Automation above functions like in the following.

  • I chosed a “Manual trigger” which allows only some users from some groups. However, you can of course choose any type which suits you best,
  • I created a “Branch rule” as a “jql” and checked a specific project for a specific custom field.
  • Based on the returned Issues, I updated a custom field called “Department” whose value come from a custom field called “Product owner” (customfield_10000) by extracting only the portion between parenthesis.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: