automatically set field value based on other field values

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).

3 answers

1 accepted

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.

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

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

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

@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.

Unfortunately, no. Sorry.

0 votes

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

 Thanks!

Suggest an answer

Log in or Register to answer

Stay in touch

Be the first to know what's trending on Atlassian Community