Hi,
I would like to ask if it is possible to create a rule that will be increasing the value of a field based on the options that will be selected for another field.
Specifically, I would like to add a field named X that will keep a weight for each ticket.
Then, based on the selected option of another field, a different value will be added to the Weight field.
So if we select the value A for the field X, the Weight will become Weight + 4
If we select the value B for the field X, the Weight will become Weight + 2
Is this possible?
Hi @M C
Yes, that is possible with an automation rule. What have you tried thus far to solve this need?
If you have started a rule, and it is not working as you expected, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
If you have not started a rule, I encourage you to do so. Successfully using automation rules requires learning and experimentation. Just using the rules provided by others will certainly lead to problems maintaining the rules...particularly if the examples provided are incorrect and / or poorly constructed.
To get you started on creating your rule, please refer to these documentation and example sources:
As a hint for your rule...
Values in a select option field provide both their id and values to an automation rule. And so those values could be used to increment another field.
Assuming your Weight field is a number, and there is a field named X with values of:
You could use a Lookup Table to translate the values in field X to numbers, adding them to the Weight like this:
{{issue.Weight.plus(myConversionTable.get(X.value).asNumber)}}
Please look here to learn more about Lookup Tables and math operations:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
Kind regards,
Bill
Hi @M C
Welcome to the community!
Yes, we can achieve this using Automation for Jira.
So, if you see the above example which I tried. I have "Weightage of the ticket" as a select list (single choice) field and Counter (Single line Text field). So, when the issue is been created, if the weightage is chosen and the counter field will get updated by 4 for 5 weightage and 5 for 10 weightages.
Hope this helps!
Thanks,
Sharu
Empyra Software Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your response
I tried something similar but still doesn't work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @M C
Kindly provide what is the action performed with this automation which you tried or did you get any error message and so on.
This will help me to resolve your issue.
Thanks,
Sharu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Smart values cannot be directly added, except for setting number fields.
Otherwise that will produce a text value. For example, {{issue.ITSU Weight}}+4 will instead concatenate the values, such as 10+4 and not 14.
Please review the documentation for how to add values, either with the inline or longer form math expressions:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
One additional possible cause of the error is the smart value may be incorrect for the field. Specifically that "ITSU Weight" may be null.
Smart values are name, spacing, and case-sensitive. And often the smart value does not match the displayed field name on the issue views. These steps help to identify the correct smart value (and custom field id) for the fields.
The essential steps are:
https://<yourinstanceurl>/rest/api/2/issue/<issuekey>?expand=names
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.