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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Scriptrunner Behaviour on description on issue creation and if a component is selected



I would like to know if it's possible to prefile with a behaviour the description field only if a component is selected (for exemple if component selected = A then description = A else description is empty).

I have already this code but i don't know how to filter on component selected event:

def desc = getFieldById("description")
def issueType = getFieldById("issuetype")

def defaultStory = """
def defaultBug = """\
def defnull = """ """
if (getActionName() == "Create" && issueContext.projectObject.key == "PROJ"){

if ( =="Story"){
else if ( =="Bug"){
else {
else if (getActionName() == "Create" && issueContext.projectObject.key != "PROJ") {

Could you help me on this subject?


Thank you in advance.


Mickael O 

1 comment

Mickael - It sounds like you are on track. Try to go over the program again and see if you can work it out. I'll do the same and see if I can come up with something as well. 

Good Luck!


Log in or Sign up to comment
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,143 views 8 28
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