Dear Community,
I am currently facing an issue with the "Resolution" field, which does not appear in the "Issue view". I give you more details below.
I have configured a specific screen for a specific issue type that I called "Support request". It gathers two tabs with different fields, as shown below:
You can see that I have put the "Resolution" field in the second tab.
When I create a ticket "Support request", this field does appear:
However, once the ticket is created and that I want to check it from my board or my backlog, this field is not displayed anymore (in neither of the tabs):
I have checked the issue layout of this ticket, and it does appear:
To be noted that I tried something else just in case: I changed the issue screen of this issue type by putting the "Resolution" field in the first tab instead. In this case, the "Resolution" field would not appear at all in the issue layout configuration panel.
Could someone tell me how I should do to display this "Resolution" field in the "Issue view" please ?
Many thanks :)
so here is the script I created to solve this, is probably isn't the most elegant but our JIRA instance is an oddball.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import java.text.NumberFormat
CustomFieldManager cfm = ComponentAccessor.getCustomFieldManager();
String att1 = "Field name1"; //call all your fields here
ArrayList list = new ArrayList();
list.add(att1); //add all fields to a list
Double passCount = 0;
int maxAttCount = 0;
if (list.isEmpty()) {
maxAttCount = 0;
}
else {
maxAttCount = list.size();
}
for (int i=0; i < maxAttCount; i++) {
String customField = list.get(i).toString();
if (customField != null){
CustomField cf = cfm.getCustomFieldObjectByName(customField);
Map cfVal = issue.getCustomFieldValue(cf) as Map;
if (cfVal){
String firstValue = cfVal.get(null);
if (firstValue.toString().equals("Pass")) { //this is the field attribute that will be calculated
passCount = passCount + 1;
}
else if (firstValue.toString().equals("Fail")) {
}
else if (firstValue.toString().equals("FYI")) {
}
else if (firstValue.toString().equals("NA")) {
}
}
}
}
int finalCount = passCount/15*100;
return finalCount + "%";
else if (firstValue.toString().equals("FYI")) {
}
else if (firstValue.toString().equals("NA")) {
}
}
}
}
int finalCount = passCount/15*100; //only 15 of the fields actually contain a fail attribute
return finalCount + "%"
Hi Joe- you're likely going to need a scripting app to help perform mathematical operations to aggregate statistical information about a project, particularly when you're running metrics on options within a multi-option custom field.
Here's a quick example of a SIL script that you can run whenever an issue is created or edited in your project via SIL Listeners or on a set schedule with SIL Scheduler. This is made possible with Power Scripts for Jira.
string jql="project=PROJ"; //update with your project keystring [] allProjectIssues=selectIssues(jql);
number totalProjectIssues=0;
number totalPasses=0;
for(string issue in allProjectIssues) {
totalProjectIssues += 1;
if(%issue%.customfield_12345=="Pass") {
totalPasses += 1;
}
}
number percentPass = (totalPasses / totalProjectIssues) * 100;
customfield_23456 = percentPass; // assumes you want to store this value in a number custom field
Hope this helps!
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.