Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Using Smart values to sum two Number fields

Hello,

I have 2 Number fields, each time a user enters a value to the first one Field1, Field2 should be updated as the below logic:

Field2=Field2+Field1

In my Automation rule, I used "Field value changed" for Field1, and as action, I've selected "Edit issue fields" to edit Field2, then I used the below to set Field2:

{{issue.Field1.plus(issue.Field2)}}

{{#=}}{{issue.Field1}} +{{issue.Field2}}{{/}}

Nothing is working.

What I'm missing?

2 answers

1 accepted

0 votes
Answer accepted
Darryl Lee Community Leader May 07, 2021

Hi Nelly!

It would be helpful if you could take a screenshot of your rule so that we can look at the triggers, logic, etc.

Additionally, it's always helpful when troubleshooting to liberally use Log action to capture exactly what Smart Values might be doing. That would look something like this:

Screen Shot 2021-05-07 at 11.58.36 AM.png

Hello Darryl

Sure! Here you go.

Here's the rule

Screen Shot 2021-05-07 at 3.54.17 PM.png

Here's the log

Screen Shot 2021-05-07 at 3.53.23 PM.png

And the issue

Screen Shot 2021-05-07 at 3.56.31 PM.png

 

I did the same for the equal , but always the Field1 is always empty.

Thanks

Nelly

Darryl Lee Community Leader May 07, 2021

Hrm. I wonder if timeSpent is a reserved word for timetracking. I see various references to it here:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-math-expressions/

If that's the case, you might be better off using the Custom Field ID which you can find via the Using URL suggestion here: https://confluence.atlassian.com/jirakb/how-to-find-id-for-custom-field-s-744522503.html

Once you find that, you would use: {{issue.customfield_12345}}

Oh, one other idea before doing that is to try: {{issue."TimeSpent"}}

Like Nelly Sammak likes this
Darryl Lee Community Leader May 07, 2021

Ah, confirmed that Automation already has a built-in "timespent" field. So yes, try putting it in quotes, or using the custom field ID.

https://codebarrel.atlassian.net/browse/AUT-1247

Hello Darryl

I used the custom field id and that solved the problem.

Thank you very much

Nelly

1 vote
Darryl Lee Community Leader May 07, 2021

I probably should take a step back though and ask why you're using custom fields to track time spent, when you could have people use the built-in Time Tracking functionality which does all of this for you:

https://support.atlassian.com/jira-cloud-administration/docs/configure-time-tracking/

If it's a concern that you want people to log work during particular transitions, you can add the "Time tracking" field and it will display appropriate fields for time spent, estimated time left, etc.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

244 views 7 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you