How can I get correct values of dynamicly updated custom fields on dashboard or on issue navigator?

Harald Pfitzner August 12, 2015

Hello,

 

We have some custom fields with dynamicly calculated values.

The scripts in the custom fields are running well in the issues.

But on dashboard or issue navigator they show false values.

Actualize the browser window or the gadget doesn't help.

We have also disabled caching, nothing works.  

 

How can we get the correct values in dashboard and issue navigator?

 

Best Regards

Harald Pfitzner

6 answers

0 votes
Harald Pfitzner August 20, 2015

Hello,

After a few days of testing the script additions you can close this here.

The script work now like expected, but slows down dashboard and issue navigator.

We must accept this because we need the right values more than speed.

 

Best regards

Harald Pfitzner

0 votes
Harald Pfitzner August 12, 2015

Hello Nic,

 

It is not a problem of subtasks, every issues are affected.

One more line in the script:

           enableCache = {-> false}

seems to be the solution, but it slow down JIRA dashboard and issue navigator extremly.

But we must check this also in a longer period.

 

Best Regards

Harald Pfitzner

0 votes
Harald Pfitzner August 12, 2015

The plugin is "Adaptavist ScriptRunner for JIRA Standard Edition".

The custom field is created as "(groovy) scripted field".

And yes in issue it works like ecpected.

Only in the gadget or in issue navigator the field doesn't show correct values.

 

Best Regards

Harald Pfitzner

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 12, 2015

OK, how are you indexing the parent issues?

0 votes
Harald Pfitzner August 12, 2015

The reindexing seems to be not the solution.

After a while the dashboard shows any other values except the right.

We need an option to disable the cache for the values of custom fields.

The gadget refresh funktion doesn't recalculate the custom fields correctly,

it takes the values from some cache.

But it's not the same cache like we have disabled by Java parameter.

(com.atlassian.gadgets.dashboard.ignoreCache = true)

Gadget used is "Filter Results".

 

Best Regards

Harald Pfitzner

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 12, 2015

How are you creating these dynamic fields? What plugin(s) are you using? There is no "cache" on custom fields, it's the index.

0 votes
Harald Pfitzner August 12, 2015

We have added now these two lines in our script

        indexManager.reIndex(issue);

        customFieldManager.refresh();

The result looks a little bit better at the moment.

We must check this in a longer period.

 

Best regards

Harald Pfitzner

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 12, 2015

The usual culprit for this is that you are not indexing the issues that the scripted fields belong to.  A typical example is "I want to add up values in field X on subtasks to display on the parent" - when you edit a subtask's field X, that works fine, but the parent issue won't display the recalculated "total of sub-X" until it is indexed.  And editing a subtask does not index the parent.

Suggest an answer

Log in or Sign up to answer