Why I can not see my customfield in View screen ?

Mandia July 23, 2018

Dear all,

I have created a new customfield with Text type named "Days Remaining".And I only add it in the View Screen and use sil script to set the value for this field. But when I create a new issue. The first time I can not see that customfiled in my view screen. After I refresh the page then it show up.

Why? Does anyone knows how to fix this issue?

Thanks,

Mandia

1 answer

1 accepted

1 vote
Answer accepted
Alexey Matveev
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 Leaders.
July 23, 2018

Hello,

You can not see this custom field in the view screen, because custom fields without values are not shown in the view screen.

If you have Jira admin permissions, you can go to the detail view issue screen and click Admin->Where is my field. Then enter the filed name and you will see, why this field is not in the screen.

Mandia July 23, 2018

I know the reason about my issue.

Since the Issue Detail is rendered first and then the Issue Tab Panel is rendered, at first refresh the value of custom field is set, but the Issue Detail being already rendered it was not able to show the custom field value, this is the reason why the Custom field value is displayed at the second refresh of the page. 

I have fixed this issue. I can set the default value to my new customfield by customfield configeration. Then when I create a new issue, It can display in the first time.

Thanks,

Mandia

Mandia July 23, 2018

Hi Alexey Matveev,

Do you know how to use sil script to change the customefield color?

I want to display the daysRemaning in red. Here is my sil code:

else if (derivedIssueType == "Non-Compliance")
{
interval daysRemainingFormat;
if(status == "Closed") {
daysRemainingFormat = updated - created;
}
else {
daysRemainingFormat = currentDate() - created;
}

number days = 30 - (daysRemainingFormat["DAY"] + (7 * daysRemainingFormat["WEEK"]));

daysRemaining = days;
}

Alexey Matveev
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 Leaders.
July 23, 2018

You can not colour fields with SIL

Mandia July 23, 2018

Hi Alexey Matveev ,

Thanks for your reply.

I have a question, I want to set Days remaining filed to 0 when the status is Closed or Cancelled.

Could you please help me how to implement it?

My sil code:

else if (derivedIssueType == "Non-Compliance")
{
interval daysRemainingFormat;
if(status == "Closed") {
xxxxxxxxxx
}
else {
daysRemainingFormat = currentDate() - created;
}

number days = 30 - (daysRemainingFormat["DAY"] + (7 * daysRemainingFormat["WEEK"]));

daysRemaining = days;
}

I try to setxxxxx to daysRemainingFormat = 0;

but it does not work.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events