Forums

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

Is it possible to copy a mandatory field value from Epic to child on creation?

François Dumas
Contributor
September 29, 2021

I have the following requirement:

  • On Issue creation
  • If the issue is linked to an Epic and "custom field A" is empty
  • Set the new issue's "custom field A" value to the Epic's "custom field A" value

This is because in 95% of the cases, child issues should have the same value for "custom field A" as their parent, unless specified otherwise.  Automating this process would save a lot of unnecessary data entry.

This is a fairly straightforward task that can be accomplished by an Automation and I can find plenty of examples of this on the web (for example this Jira Software Cummunity Question ).

However, my problem is that "custom field A" is mandatory, and the Issue Creation sequence of event does not seem to allow for this, i.e.:

  • My automation starts with the trigger "When: Issue created"
  • I thought the trigger might fire before the "mandatory field check" is performed, but it seems it is done after, therefore the Issue won't be created unless the user sets a value for "custom field A", meaning my automation never fires...

I know I could either:

  • Make that field optional
    • But I can't do that because it could end up empty on issues created without an Epic
  • Or make that field optional AND the Epic link field mandatory
    • However, I don't want to to that because there are a lot of ad-hoc "floating tasks" in our projects and forcing all of them to be under an Epic would be counter productive. 

Is there a way I could satisfy this requirement?  Any help will be greatly appreciated, thanks! ☺

2 answers

1 vote
Julien Peyrade _ Elements
Atlassian Partner
September 30, 2021

Hello @François Dumas 

I may have a solution, depending on how you create your issue.

I'm the Product Manager of the add-on Elements Copy & Sync, which lets you do just what you need.

With this plugin, the easiest way would be to trigger the issue creation from the Epic, in which case the link to the Epic, as well as the value for custom field A, would be automatically set during the issue creation. This works for mandatory fields.

If you have any question on how to set this up, our support team would be happy to help.

Kind regards,

Julien

François Dumas
Contributor
October 1, 2021

Hi @Julien Peyrade _ Elements  and thank you for your reply.

As I commented on the other answer, I was hoping to find a solution that wouldn't involve a 3rd party app, but I am ready to evaluate these options if there are no other solutions.

Just a clarification: what do you mean by "trigger the issue creation from the Epic"?  Do you mean that I would trigger the issue creation on creation of the Epic?  If so, that wouldn't satisfy the requirement because we need to populate "custom field A" when an issue is created and linked to an existing Epic.

Julien Peyrade _ Elements
Atlassian Partner
October 1, 2021

Hello,

No, I didn't mean create the issue during the creation of the Epic.

I meant that if you want to create an issue in Epic A, this issue has to be created by clicking on a button in the Epic A. Basically, what I want to say is that you wouldn't be able to create the issue and only then add it to the Epic.
You have to know that the issue will be in the Epic when creating the Epic.

So, these are the steps to follow : 

  • open the Epic
  • click on our add-on in this Epic to create the issue

And that's it. With proper configuration, the issue will be automatically linked to the Epic, and the custom field would be automatically initialized.

I believe it fits your use case, I just hope I'm clear enough explaining it.

Julien

0 votes
Alex Koxaras _Relational_
Community Champion
September 29, 2021

Hi @François Dumas 

What I'm thinking is that you could possibly achieve this with an app, and via workflow automation (rather than JA). E.g. with JMWE:

  • You could add a validator on the create transition., that the "custom field A" must not be empty IF an epic doesn't exists or if the epic link is empty (this will satisfy your requirement of having the field mandatory during issue creation)
  • Then you would add a post function to copy the value of "custom field A", only if an epic exists (this will satisfy the copying the value requirement)

I think that this could satisfy both your requirements. With jira automation the problem is that it's actually a listener and wait for the event to be fired. But the event fires on the create transition. So this should be your main focus of work.

François Dumas
Contributor
October 1, 2021

Hi @Alex Koxaras _Relational_

Thank you for your suggestion.  I was hoping to find a solution that wouldn't involve a third party app, but I have investigated JMWE and it seems like it might meet my requirements. 

I will check if we have other requirements that could be met by installing JMWE and if we have a few others, it might justify the purchase. 

Either way, I will install the trial version and see if I get it to work.

Thanks again for your input! :)

Suggest an answer

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

Atlassian Community Events