Calculated value is broken each time issue is displayed

Guillaume Robert December 1, 2015

Hello,

I am using ScriptRunner 3.1.3 and have created a scripted CF called "Covered by TP".

Here is the script that is set in this CF:

 

def tp_coverage = getCustomFieldValue("TP Coverage")

if (tp_coverage == null)

{

    return "Not covered by TP"

}

else {

    return "Covered by TP"

 

At the first attempt, the script works well and returns the good value.

But each time an issue with this scripted CF is displayed or edited, the value gets broken:

When searching for issues based on this CF, if I add the condition AND "Covered by TP" = "Not covered by TP", issues with this field "Covered by TP" with value "Covered by TP" will be displayed. After some tests, all the isues edited or just displayed will fall into this behavior.

 

Can you help to fix this please?

 

Many thanks,

Best regards.

 

1 answer

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2015

Hi Guillaume,

problem could be related to indexes. If you try to perform a reindex, JIRA search should display the correct value. Could you try?

Please let me know if my assumption is correct.

Regards,

Fabio

Guillaume Robert December 2, 2015

Hello Fabio, and thank you for your fast answer. I will type my answer here as I can't answer you with the answer form. When reindex is performed the problem is fixed, but then when the issues are displayed or edited after this, the same problem occurs. I use this field on a JIRA Pie Chart macro in a Confuence page, after a reindex is done it is all good, but when people starts to work on issues, the chart is getting wronger and wronger. Best regards.

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2015

Hello Guillaume, are u using some automation on your workflow (plugin postfunction, listener or something like that)? What Custom Field type is associated to "TP Coverage"?

Guillaume Robert December 2, 2015

Hello Fabio, for the stories and bugs we use the same workflow, and there is no automation in them. The field "TP coverage" is a field type implemented with the plugin SuiTest, Panel Filter CF type. Best regards.

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 3, 2015

Hi Guillaume, probably using that plugin there's a bug so that the specific issue is not reindexed after a change. Please, could you check log file in order to figure out if something wrong happens? Regards, fabio

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events