Hi all together,
we use Jira Software Data Center 9.4.8 with ScriptRunner.
We've got a custom field of type "Text Field (read only)" and don't want it to be copied when an issue is cloned.
How can we manage this?
Best regards,Gisela Lassahn
HI @Gisela Lassahn
Create an automation based on issue created, due to the fact the clones links is added after the issue creation, you wil need a re-fetch issue action first.
Then have a condition on linked issues based on cloners link and if all is true, edit action to the cloned issue to empty the read-only text field.
Hi @Gisela Lassahn ,
for my knowledge you can't do that. Automation has not a trigger for that event and a custom listener has not a specific event for issue cloning.
For a cloud instance there is an app for that (https://marketplace.atlassian.com/apps/1218652/deep-clone-for-jira?hosting=cloud&tab=overview&source=community58) but it seems to be not available for data center instance.
Fabio
Hi @Marc -Devoteam- ,
in our instance there are no clones links created when an issue is cloned because we didn't want those links and configured it out some years ago (see Configuring issue cloning | Administering Jira applications Data Center 9.4 | Atlassian Documentation).
But my problem is that the edit issue action doesn't work to clear read-only text fields.
This is how I did it. The field still is filled after cloning.
Hi @Fabio Racobaldo _Catworkx_ ,
thanks for you hint.
Maybe we'll migrate to Jira Cloud in the future.Then we'll test if the app is helpfull for us.
Hi @Gisela Lassahn
What is your complete rule, how will you now you are triggering on the cloned issue?
DO you have an identifier?
in new (not cloned) issue the field is always empty because it can only be filled lateron by another, manually triggered automation rule.
So, in this rule (triggered when an issue is created), I check if the field is empty and try to empty the field if it is not empty.
Please vote for [JSWSERVER-25829] Ability to clear the Read-only custom field using the Automation - Create and track feature requests for Atlassian products.
What you are trying to do is not doable directly with Automation.
Instead, I suggest just using ScriptRunner to achieve this.
Please clarify when exactly you want to trigger the issue cloning. Is it when you transition the issue?
Thank you and Kind regards,
Ram
Hi @Ram Kumar Aravindakshan _Adaptavist_ ,
the issues are cloned manually via the "Clone" action in the "More" menue within the original issue itself.
In Automation there's no trigger for the clone action but for "Issue created"; so I'm using this one instead.
We are new in ScriptRunner and still don't know all the possibilities.
It would be great if you could help us solving the issue with ScriptRunner.
Many thanks and kind regards,Gisela
I have previously provided an answer in the Community of how you can Clone an Epic along with all its Issues and Sub-Tasks via Post-Function.
It is available in the Adaptavist Library.
So using a similar approach, you could use ScriptRunner add-on for Automation and add the code to trigger the cloning.
Please clarify based on what condition you intend to trigger the cloning.
Thank you and Kind regards,Ram
It looks like you're new here. Sign in or register to get started.