Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

on issue creation, how to set the project/customer custom field to value = project of the parenepic

Geneviève Carton de Wiart September 24, 2020

Hello,

On issue (<> epic) creation in a specific workflow I would like to set the project/customer value to the project/customer of the parent epic. so that when I create an issue in an epic, all issues inherit the project/customer information from the epic.

I succeeded  to configure to set the project/customer to a specific value, but I don't see how to get the value from a parent element. (note that when you create an epic, project/customer is required and you can pick out from a list)

I tried by entering a smart value instead of a specific value (for ex. {{issue.epic.customfield_10056}} supposed to return the prj/customer of the parent epic - or {{issue.epic.Project / Customer}}) but no value is set.

Smart values are probably not meant for that. But how can I define the value in my post function?

Thanks

 

1 answer

0 votes
John Funk
Community Champion
September 28, 2020

Hi Geneviève  - Welcome to the Atlassian Community!

Can you share the rule that you have so far? 

Geneviève Carton de Wiart September 29, 2020

I first had to make the Project/customer field (or customfield_10056) visible for the type of issue. (we don't need to view it, it was enough to set the value in the background but it seems Jira won't set a value if it is not visible) 

Adding a post function to set the Project / customer to value "customer X" works. 

But I want to inherit the Project / customer from the parent epic of the issue. I tried like this, but it has no effect. (after publishing my workflow). {{issue.epic.customfield_10056}} did not work either, but smart values are probably not meant to be used here. What else could I use? 

Annotation 2020-09-29 113710.jpg

Geneviève Carton de Wiart September 29, 2020

putting the post function before the create (as help seems to indicate you need to do for custom fields) or lower in the sequence does not help

John Funk
Community Champion
September 29, 2020

Sorry, I was under the impression that you were using Automation For Jira. I am not sure you will be able to do with post functions without using an add-on like JMWE. 

But you would also do this with Automation For Jira which is now a free tool. See this for more information:

There are two types of automation:

  • Global: In the Free version, you get 100 executions per product, per month
  • Project: In all versions, you get unlimited executions per month

Automation Basics: https://www.atlassian.com/software/jira/guides/expand-jira/automation

You can do this via global rules to apply to all projects also. You'll need to be a Jira Admin/Site Admin, go to Jira Settings > System > Automation Rules (left-hand menu).

For more on using Automation For Jira see these help pages.

Geneviève Carton de Wiart October 19, 2020

Hi John, thanks for this input. I could set up an automation rule to do the trick :-) 

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events