I am trying to add 2 smart values and then divide it by 2 to set a 3rd field value. I am using the following to try and just add the 2 numbers but it isn't working:
{{#=}}{{issue.Person Priority}} + {{issue.Issue Priority}}{{/}}
I would think that if this worked I could divide by 2 using this
{{#=}}{{issue.Person Priority}} + {{issue.Issue Priority}} / 2{{/}}
but with the Person Priority being 4(set by previous automation) and Issue Priority being 4(set by Post function), the Dynamic priority set by the above smart values = 4 instead of 8.
Any help would be greatly appreciated.
Hello @Anthony Esslinger
Is this in the context of an Automation Rule? If so, please provide screen images that show the entire rule and details of each step. Also please provide the details from the rule execution audit log.
I am trying to add 2 smart values and then divide it by 2 to set a 3rd field value. I am using the following to try and just add the 2 numbers but it isn't working:
{{#=}}{{issue.Person Priority}} + {{issue.Issue Priority}}{{/}}
How are you determining that it isn't working?
Are you validating that {{issue.Person Priority}} and {{issue.Issue Priority}} are numeric fields that each contain a value?
{{#=}}{{issue.Person Priority}} + {{issue.Issue Priority}} / 2{{/}}
but with the Person Priority being 4(set by previous automation) and Issue Priority being 4(set by Post function), the Dynamic priority set by the above smart values = 4 instead of 8.
Are you saying the final value from that calculation is 4, and you expect it to be 8? 4 seems to be the correct value:
4 + 4 / 2
4+4 = 8
8 / 2 = 4
I recommend that you make liberal use of the Log action in your rule to print to the rule execution log the value of each smart value you are using.
I am using the first calculation {{#=}}{{issue.Person Priority}} + {{issue.Issue Priority}}{{/}} and it returning 4 when it should be 8
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I recommend that you use the Log action in your rule to print into the rule execution log those two smart values immediately before the step where you do that calculation. I suspect that will reveal those smart values are not what you expect them to be.
For additional help we will need you to provide screen images showing the entire rule and the details of each step.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do i get the audit log to show me the values it is taking for the 2 smart values?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The delay is to insure that the Person Priority and Issue Priority are filled before the next automation tries to add the 2 fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I mentioned you can use the Log action to write information into the Audit Log. You can find info on that action in the documentation for Actions.
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/
You can fill in the Log action withe explicit text and smart values such as
Person priority: {{issue.Person Priority}}
That will print the literal text
Person priority:
and the value of the smart value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I set up 3 comments to show the Person Priority. One happens when the ticket is created, next happens 3 seconds later and the 3rd happens after an additional 10 seconds. In all cases it shows that {{issue.Person Priority}} is empty but the value of the Person Priority shows up in the ticket as 3.5 as soon as the ticket is created. It just doesn't make sense, I don't know what I am doing wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please provide images showing your current rule and details of each step, since you have modified it.
You may want to try adding a Re-fetch Issue action to you rule, after the trigger. Sometimes the trigger happens before all data has been saved. The Re-fetch Issue action will re-query Jira to get the current data.
You can find the action described in the documentation.
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/
On a side note, you don't need to write the information in an Issue Comment. You can use the Log action I mentioned previously to write the information into the rule execution log. Adding comments can cause notifications to be sent to individuals related to the issue, which may be undesirable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.