I have a custom field called "Project Cost Performance Index" custom ID 12202
The values in this field are numeric and mean:
I have another custom field called "Project Cost Status" custom ID 12203
But I want it to populate the text status based on if the Project Cost Performance Indicator is less than 1 (Over Budget), is 1 (On Budget) and greater than 1 (Under Budget).
I can do this easily with an export to Excel and conditional formatting but want it all in JIRA.
Anyone help with the script to do this? I want to just add it to the Project Cost Status description field, right?
I also have this plug-in that I used for the other custom fields that may do the trick: https://apps.decadis.net/display/JWT/Calculated+Text+Field
Hi Jessica,
Here is one example: https://community.atlassian.com/t5/Jira-questions/How-to-write-postfunction-to-add-values-in-a-custom-field-based/qaq-p/748887
Does that help?
-Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Possibly. I just am not good enough with script to parse out what I need. I don't want to do this post-function as this might change several times during the lifecycle of a task, and not necessarily just at transition.
Here is the thread that is closest to what I am trying to do, but it is pretty old and I am not sure of how to modify the script for my needs:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to populate the Project Cost Status field with the text phrase .... "Over Budget", "On Budget", or "Under Budget" based on if the CPI in the Project Cost Performance Index field is less than, equal or greater than 1.
I think this is the script I need to modify for my situation (this one hides or displays a field based on another fields value instead of populating text in the field like I need):
<script type="text/javascript">
change = document.getElementById('customfield_10124');
if (change) {
defect = document.getElementById('customfield_10171FieldArea');
defect.style.display='none';
change.onchange=function() {
if (this.value == 'Defect') {
defect.style.display='';
} else {
defect.style.display='none';
}
}
}
----------------Where:
I have a custom field called "Project Cost Performance Index" custom ID 12202 The values in this field are numeric and mean:
I have another custom field called "Project Cost Status" custom ID 12203 But I want it to populate the text status based on if the Project Cost Performance Indicator is less than 1 (Over Budget), is 1 (On Budget) and greater than 1 (Under Budget).
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.