Please see the calculated number field we need written below. I would love some help in writing the script to accomplish what we would like to accomplish. Column A (A-G) are the fields. Columns B-F are the options that can be entered for the given field. And the last row (Total Marks in Category) is multiplied by a given number depending upon what is entered as an option for the given field. Please let me know if there are any questions.
You might want to try something like:
Option val = issue.get("customfield_13603") if (val == null) return null; if (val.getValue().equalsIgnoreCase("0 (default)")) return 0; if (val.getValue().equalsIgnoreCase("1 - 5")) return 1; ...
Thanks David for getting back to me. I have entered in what you have suggested and nothing is being populated into the field. I am not sure what is wrong because there are no error messages or anything.
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.
Any time you try to actively use the field. Best thing to do is have a browser and a terminal open next to each other on your computer.
On the terminal, be tailing the log, so you're seeing it as Jira writes to it.
In the browser, edit an issue on-screen.
Any output the field throws into the log will be instantly echoed. (I've used the "edit" action as it's the most llikely to get the field's code to be called)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If O understand correctly, you have created 7 custom fields on your issues, named "A" to "G". What is the field type of these fields?
Also, I don't understand your Excel spreadsheet. What do the "1"s in the cells mean? I would assume that your fields are of type "Select", and you have created possible values equal to "0 (default)", "1-5", etc. Right? And thus the user can select a value for each field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As of now I am only worrying about Field A (Eventually we are going to create Fields B-G). So let's just say I have created 1 custom field for now. This field is a radio button field with 5 options: 0, 1-5, 6-10, 11-15, and 16-100). The 1's in the cells mean that the user is selecting one of these options. I understand the 1 can be confusing (I didn't create the spreadsheet), so I would just think of it is a checkbox.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Campbell,
We just spoke on the phone. Regarding your questions about the Calculated Number Field custom field from the JIRA Misc Custom Fields, you can get further help from Innovalog's Support team please see this Getting Support page. :)
Cheers,
Matheus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have just edited your question to add this add-on's tag so that the Innovalog team can see it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is what I have so far for the calculated number field. Can someone please take a look and help me out with this?
<!-- @@Formula:
issue.get("customfield_13603") != null ?
if (value === 6)
return (value * 2);
if (value === 7)
return (value * 2);
if (value === 8)
return (value * 2);
if (value === 9)
return (value * 2);
if (value === 10)
return (value * 2);
-->
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could also try Script Runner, there is an example of the principal of what you are trying to do here: https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted%20Fields#ScriptedFields-Calculateanumberbasedonotherfields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did some research and downloaded this add-on which allows you to use a "Calculated Number Field"
https://marketplace.atlassian.com/plugins/com.innovalog.jmcf.jira-misc-custom-fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What are you planning to use to calculate this?
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.