I have created a Calculated Number field with the following formula:
<!-- @@Formula: (issue.get("customfield_11400") != null ? issue.get("customfield_11400") : 0) + (issue.get(“customfield_11401”) != null ? issue.get(“customfield_11401") : 0) -->
The fields within the equation are assigned to the Prioritization Screen, while the Calculated Number Field is assigned to the Default/Important Screens of issues. I did this as I read that the Calculated Number Field can not exist on the same screen as the fields which it pulls from. Is that correct?
I have the Calculated Number Field associated with a Development Project as well as a Service Desk Project (test project). I read on one board that the Calculated Number Field will not work on a Service Desk Project. Is that correct?
How to I make this field appear? Is my equation wrong? Am I associating the field with the wrong screen? Any help with this will be greatly appreciated.
Finally, the above formula is a test formula to ensure that my set up is correct. I eventually want to have a much more complex formula:
<!-- @@Formula: ((issue.get("customfield_11400") != null ? issue.get("customfield_11400") : 0) * .1) + ((issue.get(“customfield_11401”) != null ? issue.get(“customfield_11401") : 0) * .1) + ((issue.get(“customfield_11402”) != null ? (issue.get("customfield_11402") : 0) * .1) + ((issue.get(“customfield_11403”) != null ? issue.get("customfield_11403") : 0) * .15) + ((issue.get(“customfield_11404”) != null ? issue.get("customfield_11404") : 0) * .15) + ((issue.get(“customfield_11405”) != null ? issue.get("customfield_11405") : 0) * .1) + ((issue.get(“customfield_11406”) != null ? issue.get("customfield_11406") : 0) * .3) / (issue.get(“customfield_11407”) != null ? issue.get("customfield_11407") : 0) -->
Will this formula work, or do I need to bracket in everything from customfield_11400 through customfield_11406? I am trying to make a scorecard for development projects.
Found the Solution internally. The reason that the field was not visible on the screens that it was assigned to was because the Text Style Formatting of some of the quotation marks. I had written on the formula in a text document and copied and pasted the formula into the Custom Field Description. Upon that action, it carried some style formatting from the text document that the code did not recognize. Once discovered, the simple formula was able to work. The second issue that came up was the null value of the final field of the complex formula. That came down to the mathematical function that you CANNOT divide by 0, as such the formula failed. We set the default value of the field to "1" and made the Null value "1". Field is up and operational. Project in JIRA are using it.
What should the "Search Template" be set to. Currently mine is set for <Number Range Searcher>, should it be <None>?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I updated the calculation to:
<!-- @@Formula: int i = (issue.get("customfield_11400") != null ? Integer.parseInt(issue.get("customfield_11400").toString()) : 0) + int i = (issue.get(“customfield_11401”) != null ? Integer.parseInt(issue.get(“customfield_11401").toString()) : 0) -->
I saw on a different board that that might work. I still can't get the field to appear. The message I receive when I click on "Where's my field" is "The field 'A Test Calculation' does not have value for issue TPFD-1 and will not be displayed on the view issue page. Set value for that field so that it shows up." This doesn't make sense to me as I have values in the two fields (10 & 10 respectively) and the field is set to to the simple addition equation.
I have checked the logs and can't see a reason why the field is not appearing. I really need this field to start working and appearing. It is not associated with the same screen as the fields it is calculating.
Any advice?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you watching the Application log while you're writing JAVA into these fields? I'm sure you're just running into a simple error and the add-on will be very verbose about any issues you're receiving.
I also tagged your question with the add-on in question because otherwise David Fischer won't know you're asking about his add-on.
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.