Can other field values be changed when the calculation occur?

Carsten Beck-Astrup February 9, 2014

Can other field values be changed when the calculation occur? Is it possible to impact another field on the screen with a new value from the "formula" code at the same time the calculation runs? Will it also work with JIRA 6.x's inline edit?

PS: We cant use the Behaviors plugin because it does not support IE 8.

4 answers

1 accepted

0 votes
Answer accepted
Carsten Beck-Astrup July 29, 2014

We will upgrade to IE11 and then use the new version of the Script Runner plugin.

0 votes
Alexey July 6, 2014

Hi, please tell me when can I add edit templates for my custom fields...

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.
July 6, 2014

Same way you put in the view templates - lines in the atlassian-plugin.xml that point to them.

Alexey July 6, 2014

Hi Nic, thanks a lot. I am sorry, but I don't know what line I should be add in my case :) I'd like to see and use in Post functions values of Jira Misc calculated fields. Is it possible? And what should I add to atlassian-plugin.xml for example to see in transition screen read only Jira misc calculated Date-time field: Customfield_11492 (Duedate for development based on date of agreement from customer).

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.
July 6, 2014

I'm afraid I don't understand the question. Jira misc calculated fields calculates some information based on other data and is an addon. You're asking about editing field data, so you need to be doing that in your own plugin, not trying to hack jira misc calculated fields (and, you don't want to edit calculated values anyway)

I think you need to step back and define exactly what you are trying to acheive here, as everything you're posting seems rather muddled so far.

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.
February 9, 2014

Derived or calculated fields can do part of this - you can write plugins that provide them, or implement them with the script runner. They will still not work with inline edit though - they need to be re-read and that means a refresh of the screen.

David _old account_
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.
February 10, 2014

To my knowledge, calculated fields (extending CalculatedCFType) will never show up on a transition screen. Unless you know of a way to trick JIRA into showing them, in which case I'm very interested.

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.
February 10, 2014

You've always been able to stick calculated fields on transition screens.

There's no trick to it, they work the same as other custom fields - if they have an edit template (obviously without any actual input), they'll appear on edit type screens.

David _old account_
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.
February 11, 2014

Oh, cool! I never thought of trying to create an edit template for them, since you can't really edit them.

Still, they won't get updated during the life of the transition screen, but that might be acceptable in some cases. I'll try adding edit templates to my custom fields asap! Thanks for the info.

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.
February 11, 2014

No problem, I worked it out when I first used the message fields in the Jira toolkit - logically, they had to display on edit screens somehow.

But yes, they've got the same problem as inline-edit because they won't refresh on editing oter fields, so it's not entirely ideal, but hey - close is good :-)

0 votes
David _old account_
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.
February 9, 2014

Unfortunately, this isn't possible.

First of all, calculation only occurs when a "view issue" screen is displayed - never during a transition. For that matter, calculated fields cannot be shown on transition screens (this is a limitation of JIRA).

Then, calculation occurs during indexing - at which time you cannot modify an issue.

To my knowledge, the only way to do what you want (or at least some of it) is using the Behaviors plugin, unfortunately.

Suggest an answer

Log in or Sign up to answer