How create a scripted field that shows language depending of project in CREATING ISSUE screen

I want to show a language field that is a selector of language.

the values of the selector shall change depending of Project or UserGroup ( or whatever )

I am using JIRA 5.1.4

I am using script runner to create a scripted field "language"

question is :

has to be done in Groovy, Java, Javascript or in Velocity ? ( what is better ?)

I am trying to use javascript : (HTML option)

<!-- only a test -->

<script type="text/javascript">

pr = document.getElementById('Project');



Result it not compiles --- ( error in line 1 )


in " templates " section : can I use a macro ? like this ? ( velocity macro )

## script info


## Participating offices ::::::::::::::::::::::::::

#if ($UserGroups.contains("cyprus-agents") )


#elseif ($UserGroups.contains("denmark-agents") )


#elseif ($UserGroups.contains("ohim-knowledge-administrators") )


#else ## :::::::::::::: OHIM :::::


1 answer

You can put groovy in the groovy box, or velocity in the template bit. I would try to do it in groovy alone and see how you get on. Go through some of the examples... there are too many wrong things here to call them out one by one.

ok, yes it seems that the normal way is in groovy


I Like groovy

xd, it can be done with JIRA :), without scripting :) in custom fields :) ,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,711 views 17 21
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you