Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

automatically set field value based on other field values

Kevin Mote
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.
March 25, 2013

I want to find a way to "programmatically" set the Priority field in a Jira issue, based on the value of two other fields (they happen to be custom fields, if that makes a difference). I was originally hoping to be able to do this in a Post-Function of a Workflow Transition, but apparently I can only set a field to a specific value, not a computed one (with the built-in post-functions, at least).

I've been playing with javascript but the documentation is sporadic and I haven't been able to get it to work. (Plus, I'm still not sure that this is the recommended method of attack. The documentation warns, "adding Javascript to custom fields is a customisation and not maintained as a supported part of JIRA.")

I don't want to add another plugin, unless it is free and well-regarded by the community.

What is the best approach? (I'm running JIRA 5.1).

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

4 votes
Answer accepted
Ramiro Pointis
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.
March 25, 2013

Hi Kevin, while I was reading your question I thought 'definitely going to recommend him the Script Runner Plugin' then I read your almost last line. Anyway, I'm going to insist with that plugin because it's not only free but it is by far the best plugin I'm using, many people can say that.

This plugin has what it's called Built-in scripts, with many possibilities. It's like adding code but that it's only executed when an event it's fired. Check it out.

https://jamieechlin.atlassian.net/wiki/display/GRV/Script+Runner

Hope this helps.

Kevin Mote
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.
March 25, 2013

Well, with a 4-star rating and over 24K downloads, that definitely meets my "well-regarded" criteria! I'll give it a try. Thanks!

Jud Harris January 3, 2014

Hey there! Any luck with this? Looking to set the Priority field here based on two custom fields (Impact and Urgency) - basically looking to implement this ITIL priotization matrix

Kristjan Geir Mathiesen - Origo October 12, 2015
Markus Bönke November 1, 2015

In the on demand version of Jira it is not possible to install plugins. Is there another solution to automatically set field value based on other field values there?

0 votes
Jennifer Zou December 5, 2017

Same need here. Looks like no free solution now...

0 votes
Laul October 18, 2016

@Chris Bezile - My turn to have the same request; did you find anything (free!) about that?

 Thanks!

0 votes
Chris Bezile February 5, 2016

@Kevin Mote - it's been quite a while but would you happen to have the script you used in ScriptRunner?

I have the same need - update one custom field depending on the value of a different custom field.

Kevin Mote February 8, 2016

Unfortunately, no. Sorry.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events