I would like to create a custom field of type “Formula” in a team-managed project. The formula is simple:
{issue.customfield_19054} * {issue.customfield_19055}
Both custom fields are of type “Number”. However, when I try to enter the formula, the fields are always highlighted in red and cannot be saved. I’ve tried various variants, including:
How do I reference custom fields correctly in a formula?
As @Marc -Devoteam- an automation will be needed to get to where you want to be
You will first need to create a new custom field for the calculation to be stored in
Then, create a new JIRA automation that will update the new custom field. When setting the content in that field, try the following formula
{{#=}}{issue.customfield_19054}}*{{issue.customfield_19055}}{{/}}
If this doesnt work, you can also try
{{#=}}{issue.customfield_19054|0}}*{{issue.customfield_19055|0}}{{/}}
Thank you, that would work. But I would like to use the new custom formular field since this would be much faster implemented and more usable (field is already locked for instance).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. Instead of selecting a formula, can you try an automation rule where the THEN Edit Work Item
In choose field to set, find your new custom field
In the box that appears, paste
the formulas I tried above
I believe what this does is input the value as if it were a formula but its not set as a formula field
Ive attached a screenshot of a similar automation I have built which may help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to create an automation rule to execute this calculation for you.
You also need a new field where the outcome of the calculation from the automation rule can be stored.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have an example for this automation at hand?
And why can't I use the new Formular custom field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I checked all instances I can use and the only custom formula field is only available in Jira Product discovery.
Based on this article, indeed formula fields should be coming to Jira, but based on the comments on the article it hasn't been rolled out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First of all, thank you for you hint to the automation. That is a valid workaround which works for me.
The formular field is already available in our space:
But when I try to use a custom number field for a calculation it does not work:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried this formula?
{{#=}}{issue.customfield_19054}}*{{issue.customfield_19055}}{{/}}
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.
This is related to Team managed projects and the feature is still in Beta.
https://support.atlassian.com/jira-cloud-administration/docs/create-a-formula-field/
Also based on the documentation, you van only use fields create in your Team managed project, so you can't use {{issue.customfield_xxx}}
If you have created fields A and B in your Team managed space, use {a} * {b} in the formula field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using it in a team-managed space and I created the fields there. {a} * {b} does not work either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works now. I have to type in customfield_19... then the fields are shown. When chossing them from the typeahead, it works.
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.