Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Calculate hidden fields with JIRA Automation

I want to set a number in the hidden item and calculate it with JIRA automation.
Hiding a field results in a Smart Value Rendering Error.

Is it impossible to calculate a hidden field?

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 29, 2023

Hello @koutarou ishibashi 

Per the 2021 answer from Simmo on this post, if your rule is running as the Automation for Jira user then it should be able to access Fields that have been Hidden through the Field Configuration.

https://community.atlassian.com/t5/Jira-Software-questions/Can-Automation-rules-edit-a-hidden-field/qaq-p/1801459

If that does not address your question please show us your automation rule and the output in the Audit Log.

If the following calculation hides the item, it will result in an error.
{{#=}}{{issue.customfield_10273}} / {{issue.customfield_10272}} * 100 {{/}}

Unknown unary operator / at character position 1: / * 100

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 01, 2023

The error is not due to trying to set a value on a hidden field. You have syntax errors in your statement that result in Jira not finding the data for the smart values you used.

Your smart values appear to have a blank space between customfield_ and the number that comes next. You need to remove that blank space.

There is no space after the customfield_.
customfield_10273, if the customfield_10272 is displayed, there will be no error.
customfield_10273, if you hide the customfield_10272, an error will occur.

Can't hidden fields be calculated?

Bill Sheboy
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.
Oct 02, 2023

Hi @koutarou ishibashi 

Context is important for automation rules; would you please post images of:

  • your complete automation rule,
  • including where you have that smart value expression, and
  • of the audit log details showing the complete rule execution, with that error?

Those may explain the symptom you are observing.  Thanks!

And as Trudy noted from that linked post: "hidden" fields can only be edited by automation rules when the rule actor is the default value, Automation for Jira.  That user has special permissions allowing it to bypass the screen/field checks for edit.  If you have changed the rule actor then it cannot edit / see the field.

Kind regards,
Bill

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events