Create issue in another project with Script Runner

Hello guys,

I have two project, A and B.
I need to create a postfunction on Project A, that will create a new issue on Project B.

Is there a way I can do that with script runner?
Have been looking for example scripts arround, but all of them are related to subtasks.

Any insight on the matter is highly appreaciated.

Kind regards

1 answer

1 accepted

This widget could not be displayed.

Hello Ariel.

This can be done through the scripted post-function Clones and issue and links.

1. Go to workflows.

2. Select the workflow for your project A

3. Select the transition from the status that you want to trigger your post function. For example, the "To Do" transition.

4. Go to the post functions tab.

5. Click "Add post function"

6. Select "Script Post function" and click next.

7. Select "Clones Issue and Links"

At that point you should set up the function as you would want it to be, a simple example would be like this:

Screen Shot 2017-05-15 at 10.28.23.png

After it is added, you need to move this post function to the last place in the transition queue with the arrows(it will originally be in the first place, and this could be troublesome for some transitions).

It will appear like so:

Screen Shot 2017-05-15 at 10.32.00.png

And you need to use the arrows in the far right untill it's in last place:

Screen Shot 2017-05-15 at 10.32.14.png

Publish your draft and it should work as intended.

If this does not help you feel free to ask us again.

Also you can check the documentation for this function here

Cheers!

DYelamos

 

Daniel

Currently I have to set target project, Is there anyway I set target project based on conditions?

Set multiple postfunctions on the same transition with different target projects and try to manage your conditions via the top scripting field "Condition" seen in the screenshot. 

hope this helps =) 

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 18 hours ago 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...

45 views 1 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