Bypass required field validation when child issue is created by cloning parent issue?

Digvijay Singh Gehlot
Contributor
August 1, 2024

Hi Community,

I have a Parent Project P and a Child Project C.

In Project P, I have configured a Jira automation which clones the Parent issue to Child issue in Project C when a new Parent issue is created in Project P.

Challenge:

  • In Project C, there is a custom field on Create Issue screen which is set as Required and is not allowing the above automation to clone the issue from Project P.
  • Audit log is saying "Issue condition passed; Clone issue: Error creating issue > Custom Field is required."

So, how can I bypass mandatory field validation when a new child issue is created in Project C by cloning the parent issue in Project P?

Please guide on how I can configure this by either scriptrunner, jira automation, jmwe app or any other configurations, it would be a great help.

Thanks

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 5, 2024

Hi @Digvijay Singh Gehlot 

My question is:
Why is the field required at all in project C ?

 

Don´t get me wrong - but TBH:
obviously you knew that Project P will create issues to Project C (as you created the automation rule). Then making a field required that won´t be delivered from my source project is just tripping yourself.

 

Nevertheless...It should be possible (at least for the creation) with scriptrunner behaviour that makes an exception for the actor of the automation rule on the workflow action create.

 

Furthermore: what happens when somebody edits the issue in Project C and tries to save he change? This would again trigger the validator and the issue could not be saved without setting the field.

 

Best
Stefan

0 votes
Jamie Edmondson
Contributor
August 1, 2024

@Digvijay Singh Gehlot  Hi. Is it possible to pass a value to the custom field without triggering another process in Project C? 

Digvijay Singh Gehlot
Contributor
August 2, 2024

Hi @Jamie Edmondson 

Thank you for your message.

The custom field is a User Picker field and is present on Create Issue screen which is made Required by configuring a Validation on the Project C Workflow.

The usage of making this Required and keeping it as Empty at the time of creating the issue in Project C is that when Reporter creates the issue, he has to select a user in this custom field which then set the Assignee on the issue when it is created. 

I want to pass a Condition either using scriptrunner, jmwe app, post function or jira automation, where when a new Parent issue is created in Project P then jira automation will clone the Parent issue and create a Child issue in Project C by passing the existing required field validation in Project C workflow.

I hope I am able to provide a detailed explanation as above.

Thanks

TAGS
AUG Leaders

Atlassian Community Events