I'm looking to create a formular made up of a number of custom fields. Each custom field is a selected value 1,3,5,8,13. In my final formula these are all recognized as "1" so in both the roll up and the custom formula, adding three fields together, no matter their selected value = 3
Update:
Wasn't sure if it was better to answer here or edit my original question but I ended up 1. adding weights to the single-select options that equal the "number value" I was looking for and then 2. simplifying the equation by creating a separate roll-up value for the fields I was adding together. I'm uncertain if the second piece was necessary but it worked so I moved on. Will test out your answer @Bill Sheboy for posterity! Here is a screenshot of what I have working now. The final formula is shown in column 1, the "cost of delay" is a sum of the next three columns.
Without seeing the details of your rule or fields, I am hypothesizing these are single-select option fields. If so, to use the value of the selection, add the value attribute. Perhaps like this:
{{#=}}{{issue.customfield_12345.value}} + {{issue.customfield_67890.value}}{{/}}
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
Kind regards,
Bill
I was unable to add the {{#=}} nor the ".value" to my formula. Is it possible I need to find the custom field ID somewhere, or that Jira Product Discover has different syntax? See screenshot where I get the wrong value (7*3=3), and subsequent one where the formula is invalid when adding ".value"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Update: the below suggestion does not work.
As you are doing the calculation in a JPD custom formula for a field you only need to use the field name for the calculation. For example:
{test number single select} * 3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right so check out the first screenshot - so i get “3” instead of “21” when the {test number single select} =7
this was the initial problem I encountered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, that is surprising that custom formulas apparently do not support that for JPD: https://support.atlassian.com/jira-product-discovery/docs/expression-based-formulas/ I will strikethrough my incorrect suggestions above.
Back to my initial suggestion: use a number field rather than a "custom formula" field, and an automation rule, triggered on a change to either option field to sum their value attributes.
You may need this how-to article to confirm the smart value (or custom field id) for the fields in order to use them: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ended up just using the custom select type and adding a specific weight as mentioned in my edit for the post above. This way I was able to keep the selection limited to the numbers I wanted to present and have the formula pick up the integers (the weights) properly!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ryan Rayfield
Welcome. To help, we will need screenshot of your audit logs of each of the custom fields to see if you have the right smart values.
We will also need the formula you are using which is not giving you the result.
So in your rule, Action -> Log and do one for each smart value which shows the value you have selected and share your results.
{{customfield_10001}}
{{customfield_10002}}
{{customfield_10003}}
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.