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
Community Members
Community Events
Community Groups

"Copy from Issue" not working for only one of several custom fields in automation rule

I've updated a rule to copy a paragraph text field from an epic to a story for a create story action.

It has worked and is still working for all other fields in the rule. I re-fetch data at appropriate points, so it shouldn't be a timing issue.


Batches issue.jpg

5 answers

1 accepted

1 vote
Answer accepted

It seems that I needed to add a re-fetch after the completed IF/Else clause, and before the create stories steps rather than after each IF within the if/else clause.

All of the other fields that I copy from the epic are populated when I create the Epic, immediately after which I re-fetch the data so that it can be applied to the stories.

Thanks for the help!

As I mentioned, the rule works for every other Copy from Current Issue action. See attached.

Even so, I did as you suggested, and changed the parameter to Trigger but it didn't change the result. I did two where I left the Copy from Current Issue as it was on the others, and one where I changed them all to Copy from Trigger. They both worked for all but the Batches field.

I've tried Copy from Current, Epic, Trigger, Parent, and none of them provide the result I'm looking for.

In my experience, Copy from Current Issue has always returned expected results for nested "Create Issue" actions, when I would expect the Trigger, Parent, and Epic to do the same (though they don't always).

It's strange.

copy from current batches issue 2.jpg

This error message appears in the audit log.

batches error message.jpg

I've checked the custom fields, field configuration, schemes, screens, contexts, and I can't find any reason that this field would be unavailable. What's interesting, is that the second custom field is found and is applied where I want it to be, even though I get this error.

0 votes

Hello @Becky Klein

Thank you for reaching out.

If you would like to copy the batches field from the Epic to the new Story issue, I suggest using the Trigger issue parameter instead of Current issue. The Current issue parameter is copying the value from the Story issue itself, while the Trigger issue parameter will copy the value from the issue that triggered the rule (Epic).

You can do that by clicking on "Copy Batches from current issue" and selecting "Trigger issue":

Screen Shot 2022-09-13 at 11.15.39 AM.png

Let us know if that works.

Hey @Becky Klein

Considering your message above, I believe the problem might be in the field configuration of your Story issue type. Allow me to further explain:

The automation plugin works as a regular user when editing issues. That means that your project must allow the automation user to properly edit the issue just like a regular user.

That being said, I suggest the following steps:

  1. Check if you can manually create an Story issue and set the batch field during the issue creation. If you are not able to do that:
    1. Confirm the batch field is added to the create issue screen and layout
    2. Confirm the batch field is applicable to the Story field context (Under project settings > Screens/Layout)
  2. Check in your automation rule details who is the actor of the rule. If it is the "automation for Jira" user, check the project role "atlassian-addons-project-access" is probably added to the permissions Create and edit issues (Under project settings > Permissions)

If none of the steps worked, please let us know if there are any errors reported in the rule's audit log.

I had all of the required fields available in the Create and layout screens.

Thanks for the help!

0 votes
Mark Segall Community Leader Sep 13, 2022

Hi @Becky Klein - I don't think you need all of those re-fetch actions.  Perhaps one re-fetch just before your create issue action?  

Separately, it technically shouldn't matter, but you may want to try changing it from copy from Current issue to Copy from Trigger Issue.

Hi @Mark Segall

The Copy from Current Issue works for this rule.

I needed to remove the re-fetches from within the if/else clause and add one after it.

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events