How can I use automation to set a custom field value to be the product of other custom fields?

Tucker Bentley January 13, 2022

I'm having a lot of trouble setting up what I thought would be a simple and straightforward automation.

I have 3 number format custom fields: Impact, Urgency and Priority Score. My goal is to set the value of Priority Score to be the product of Impact * Urgency.

I've tried all sorts of variations of formulas from these forums but not having luck. For some reason, the automation rule is interpreting the value of Impact to be null, so if I change the multiplier to an addition sign, I get the result of the Urgency value (5) as the value of the Priority Score, however if I change it back to the multiplier I get an error in the logs.

Any help would be seriously appreciated!

 

Ticket details:

jira ticket.png

Automation rule logic:automation logic.png

 

Automation audit log:

audit log.png

1 answer

1 vote
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2022

Hi @Tucker Bentley 

Welcome to the Community!!

I created three separate fields to edit a new priority field and with the same formula, it's working!

II1.pngII2.pngII3.png

Check for the field name without whitespaces, make sure your field name has no extra spaces, and if so create the separate field and the check.

Thanks,
Pramodh

Tucker Bentley January 14, 2022

Thanks for your reply; I've tried this, and I've tried deleting and re-creating the "Impact" field several times...

Oddly, when I create a new field (for testing purposes) called "Impact_2" and plugged that into the logic...it worked.

I think when I'm entering "issue.Impact" in the formula, Jira is using the original, very first custom field labeled "Impact" that I created -- which is deleted and therefore null now.

Is there a way I can see the custom field IDs instead, and use those in the formula rather than the custom field name to avoid pointing to the wrong (deleted) "Impact" field?

Thanks again!

bmccoy
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 17, 2022

Hi,

I was going to suggest it sounded like you might have a second field "Impact" on the system that Automation is picking up instead - so good catch!

We do support using the custom field id directly: {{issue.customfield_12345}}. It sounds like that might be the best approach in your case.

Also, another trick that may be useful when performing math functions is that you can set a default value in case one of the fields is empty.  e.g. {{issue.Impact|0}}*{{issue.Urgency|0}}.   This will just stop your rule from erroring out unecessarily.

Cheers,
Brydie [Automation for Jira]

Tucker Bentley January 18, 2022

Thanks for your response Brydie!

How can I see the "custom field IDs" for each custom field? I'm not using the API (not an engineer) so I can't easily access those endpoints, unless there's an easier way to go that route. It sounds like these custom IDs will solve my problem, though. I'm also not an Admin on our org's Atlassian account, though I am an admin on my specific Jira board.

Will my original, first custom field labeled "Impact" ever be deleted, or will it always be reference-able via that name? How can I reference subsequent "Impact" fields; is there a convention whereby I can try Impact.1, impact.2, etc. until I recognize the "current" field's value?

edit: I was able to get a look at the custom fields view in admin settings, and my new custom fields aren't showing up here...so I can't view their custom IDs.

For reference, this is a team managed ("next gen"?) project.

Thanks again

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events