It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Autocomplete fields based on dropdown selection in JIRA 7.1.7

Daniel Upton Nov 21, 2016

I am looking to find a solution that will allow fields within a JIRA ticket to be auto populated based upon dropdown selections when creating the ticket. I have some experience with administering JIRA but no development skills, so creating a plug-in is not an option for me. Any help here would be greatly appreciated as I need to get something in place quickly in order to meet a new business proposition.

4 answers

0 votes
Vasiliy Zverev Nov 21, 2016

You could try using ScriptRunnerPlugin. It allow to create script without plugin creation.

Namely you need script post-function.

0 votes
Nic Brough [Adaptavist] Community Leader Nov 22, 2016

Behaviours in the Script Runner would let you set pre-selected values.  Post-functions would let you easily calculate a desired value and set it after the user commits a change.  So, yes, Script Runner is probably the easy solution either way (and you'll find it's got other uses)

0 votes
Daniel Upton Nov 22, 2016

Thanks. I have set up a custom script post function, but it fails to run. I'm getting an error on the last line of the script. Any help would be appreciated.

image2016-11-22 17:5:16.png

0 votes
Nic Brough [Adaptavist] Community Leader Nov 22, 2016

In line 14, value is going to contain rubbish, because you're trying to fetch a custom field object as though it's an integer.  That will break total on line 15, and then that can't be posted in 16.

You'll also find the same problem in 8 - you need the value of a field, not the field.

Try something like

def cf0 = customFieldManager.getCustomFieldObject ("customfield_26200")
def valueCf0 = issue.getCustomFieldValue(cf0)

and so-on

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

682 views 7 0
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you