create transition copy field value

Hi,

When a new Issue is created (on create transition) I want to copy the field value of teamlead (user drop down) to assignee.

Anyone a solution for that?

 

I have tried following:

 

Post Function:

It is not working via post function besides it works on all transition excepts the create transition.

As last step oin the post functions:

"The field Assignee will take the value from Team Lead. Source and destination issue are the same." 

  1. Creates the issue originally.
  2. Re-index an issue to keep indexes in sync with the database.
  3. Fire a Issue Created event that can be processed by the listeners.
  4. The field Assignee will take the value from Team Lead. Source and destination issue are the same.

 

Script Runner:

I trying to use script runner via script listener (Fast-track transition an issue) without success:

 

Events = Generic Event

Condition: issue.statusObject.name == 'Open'

Action = target transition in my case "Ready for Approval"

How a script runenr listener trigger? Is somewhere a intervall configured when they run?

 

2 answers

1 accepted

This widget could not be displayed.

You may want to use scriptrunner post functions on your workflow. After clicking on "Create" transition and "post function" you will be able to add a Custom script function.

Screen Shot 2015-04-02 at 13.12.46.png

 

Make sure that your function is executed before the "Creates the issue originally"

 

Screen Shot 2015-04-02 at 13.32.16.png

You can change everything you want by modifying the "issue" object.

Some examples here:

https://jamieechlin.atlassian.net/wiki/display/GRV/Post+Functions

Probably the closest is "Convert fields to Upper Case on Submission"

Great it works! :) Script workflow function : Fast-track transition an issue - with no condition

This widget could not be displayed.
Joe Pitt Community Champion Apr 02, 2015

I don't think you'll be able to do it because the value isn't in the database until the issue is actually created. Before that it is just data on the screen.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

292 views 5 0
Join discussion

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