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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,280
Community Members
 
Community Events
185
Community Groups

Automation - Project Picker for Create Issue Action

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 03, 2021

Hi All,

I'm trying to create an Automation rule, which looks like the following:

  • Trigger: When Issue transitioned to Done
  • Action: Then create an Issue in a target Project

For the field Project in the Action I'd like to set this dynamically, and have a Project Picker (single project) custom field where users can choose any Project from across the instance.

The Actor in the Automation rule is a Jira Admin, and has Create Issues permissions in all Projects.

I've tried various different smart values to allow this dynamic setting of Project - including...

  • {{issue.customfield_123456}}
  • {{issue.customfield_123456.pid}}
  • {{issue.customfield_123456.name}}
  • {{issue.customfield_123456.key}}

...but all of them error.

Is there another way this can be achieved, either using a smart value, an advanced option or an alternative?

Thanks!

2 answers

1 accepted

3 votes
Answer accepted
John
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 06, 2021

Hi @Stephen Wright _Elabor8_ 

We currently don't support smart values in our project and issue type fields. We have an open issue to track this: https://codebarrel.atlassian.net/browse/AUT-948

As noted on this community post you could set the project in the "more options" on the issue create action. But you will have to do some testing, I think this will only work if the issue/project type/fields are the same between the projects. 

{
"fields": {
"project": {
"key": "{{issue.CF Project Picker.key}}"
}
}
}

Hope that helps

- John

Hello,

This is working for me, thank you. 

Timo Fitzner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 24, 2023

Hey, 

i cannot get this automation to work.

I tried everything in this thread. For me, the more options function does not work with this code. It creates issues in the same project and ignores the more options code. So it seems. 

Is there something i need to have an eye on or is it possible to use smart values in the project field now and do i need to have same project as option?

0 votes
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 03, 2021

Hi @Stephen Wright _Elabor8_

I would go with the alternative way using groovy script or sil script and create it though a post-function which I know it will work.

You need to first grab the project key from the customfield and then create the issue to that project and the corresponding fields.

Let me know if you are interested and I can provide more details.  

Hopefully someone can figure it out using jira automation.

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 03, 2021

Hi @Fabian Lim 

Open to using a post-function / Scriptrunner, if that's the best option.

It'd be good to get some more details of how you might do this, to work from!

Ste

Suggest an answer

Log in or Sign up to answer