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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • 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

Script Runner || JMWE || not working

Dear Experts,

I am trying to create a post function using script runner(JMWE) using below script to prefix a custom field value to Summary.

issue.get("customfield_XXX") + " " + issue.get("Summary")

Above script is working fine when testing in post function groovy script console, but not working after publish. I added the post function after create event.

 

 

1 answer

1 accepted

0 votes
Answer accepted

SR.gif

@shankar_kalagadandu ,

you need to use a Set Field Value post-function, not a Scripted (Groovy) post-function. And place it at the top of the list.

In the Set Field Value post-function, select "Groovy Expression" as the value type, and use your script as the value.

Thanks @David Fischer _Innovalog_ , Actually I used a set Field post function but the result is displaying as code.

Error_RT.gif

You need to select "Groovy Expression" as the value type, not "Constant or Groovy Template"

Thank you so much @David Fischer _Innovalog_ . I updated the code below and now it is working.

${issue.get("customfield_XXX")}: ${issue.get("summary")}

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

153 views 3 7
Read article

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