Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

The "Resolution" field does not appear in the "Issue view"

Axelle
September 23, 2022

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:

Capture d’écran 2022-09-23 à 09.38.37.pngCapture d’écran 2022-09-23 à 09.38.42.png

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:

Capture d’écran 2022-09-23 à 09.42.53.png

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):

Capture d’écran 2022-09-23 à 09.21.35.png

Capture d’écran 2022-09-23 à 09.44.44.png

I have checked the issue layout of this ticket, and it does appear:

Capture d’écran 2022-09-23 à 09.45.58.png

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 :)

2 answers

1 accepted

0 votes
Answer accepted
joe_dinunzio
November 20, 2017

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 + "%" 
0 votes
Justin Evans
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 9, 2017

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 key 
string [] 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!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events