Automation - Copy from Epic Issue - Can't find issue to copy from

Gábor Hajdu September 18, 2023

Hi All!

I'm facing a problem that i can't figure out - details:

I use an automation rule to copy a few custom field data from Epic fields to its Isseu fields. It is seems working, but in case of a few issues i have got the following error in the audit log, and also found that Jira did't make the necessary copies:

 

"Can't find issue to copy from
customfield_10034, customfield_10036, ..."
I used the following rule:
1. When scheduled - every 90 minutes
2. Branch Rule - For: Current Issue
3. Issue fields condition: Issue Type is not one of Epic
4. Then Edit Issue fields:
- Copy customefield1 from Epic Issue
- Copy customefield2 from Epic Issue
...
- Copy customefieldN from Epic Issue
All the affected Epics are exists and filled with all the necessary data. Also the issues are existed and linked with their Epics well. (And they are normal issues, not sub-tasks.)
I'd tried more times to run manually the rule, and got the always the same results - 95% of the issues updated well, and the remaining has the "some errors" resulted with the "can't find issue to copy from" log.
I have no clue, i appreciate any comments, suggestions, thanks!

3 answers

2 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2023

Hi @Gábor Hajdu 

For a question like this, please post images of your complete rule, showing the details of the trigger and actions, and of the audit log details showing the rule execution.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...that symptom could happen when:

  • the JQL for your trigger is returning issues which do not have epics
  • while the rule is running, an issue is removed from an epic
  • while the rule is running, an issue selected by the trigger JQL is moved or deleted
  • one or more of the custom fields selected are not present in one of the issue types: epic parent or children

After we see your rule information, we can narrow down the cause of this symptom.

Kind regards,
Bill

Gábor Hajdu September 19, 2023

Hi @Bill Sheboy , thank you for your kindly answer.

My rule is the following:

JiraRule01.jpgJiraRule02.jpg

And the result:

JiraLog.jpg

Both the issue and its epic are exists and in active state - that is why i can't understand the error result. For example:

Epic: BPSZH-861 > Issue(Task): BPSZH-862

Epic01.jpg

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2023

Thanks for that information.

The audit log also shows BPSZH-860 was picked up by the scheduled trigger: what type of issue is that?

I suspect is it not an epic and it does not have a parent epic, as that would cause the errors in the Edit Issue action.

If your intention is the second part of the rule only runs for issues which have an epic parent, you can enforce that by adding another condition test after the test "Issue Type is not one of: Epic".

Gábor Hajdu September 19, 2023

Thanks for your suggestions.

BPSZH-860 is another active issue (task) that has an active parent epic BPSZH-854. There is no different with BPSZH-861/BPSZH-862.

Again, i've double checked:

- Only Issue/Tasks are used (sub-tasks doesn't)

- All the issues are active issues, and has an active parent epic.

- Only a few of them ends up with error described earlier.

- Using the issue editor, i can click to the linked epics and open them with no problem.

- Only the rule automation seems like can't find the right epic. (but only 5% of the issues)

Gábor Hajdu September 19, 2023

Also as an evidence i created a filter, that demonstrates that JIRA finds the issue and its epic also:

Filter.jpg

The Epic Name is the same the issues "Parent". I wonder is it possible to make a query based on unique IDs not names to be sure that the issue-epic connection is correct.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2023

That is puzzling...Let's try to narrow this down a bit.

Are you using a Company-managed or a Team-managed project?  You can find that information at the bottom-left of the page on the expanding area.

You note this only happens to about 5% of the issues.  Can you reproduce this symptom consistently?

Now let's get more data!  After your condition Issue Type is not an Epic, please add an action to write this to the audit log:

START issue:{{issue.key}}; parent:{{issue.parent}}; epic link:{{issue.Epic link}} END; 

Then try to recreate the symptom and post what you see in the audit log.

Gábor Hajdu September 19, 2023

All of the projects are Company-managed business projects.

Reproducing: for the affected issues - yes. For that ones, if i make some modification on the issue in order to be selected by automation on its next run, consistently got the error. 

Log result: "[...] START issue:BPSZH-862; parent:BPSZH-861; epic link: END; [...]"

Issue and parent data is correct. Epic link is empty.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2023

When that log entry occurred, did the error you saw also happen?

If not, please try to reproduce the condition so we get both the error and the log entry, and then post an image showing the complete audit log details for that rule run.  Thanks!

Gábor Hajdu September 19, 2023

I confirm, i reproduced the same error on the same issue+epic.

I've tried with more log fields:

"START issue:{{issue.key}}; parent:{{issue.parent}}; epic link:{{issue.Epic link}}; issue parent epic link:{{issue.parent.Epic Link}}; issue parent key:{{issue.parent.key}}; END;"

The result the same:

Log.jpg

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2023

I just noticed something you posted earlier:

All of the projects are Company-managed business projects.

My understanding is business projects are all team-managed, not company-managed.  Do you see "company-managed" indicated at the lower-left side of the page?

If it is team-managed, I believe this epic symptom is a known problem, that has become intermittent since the epic link field started sunsetting.

 

I can suggest a work-around or you (and your site admin) can follow-up with the Atlassian Support team to learn what they suggest.

The work-around is to use advanced edit with JSON for those fields, rather than use the field selection from the drop-down list.  Then use the parent (epic) field's custom field id values instead of the field name.  This would bypass the problem team-managed projects have with epics in rules.

Gábor Hajdu September 19, 2023

All of the projects are Company-managed:

CompanyM2.jpgCompanyMBusiness.jpg

if i understand you, the workaround you suggested is only for team-managed projects. 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2023

Thanks for that information, as when I check business projects they appear as Team-managed (TMP).

That work-around I suggested helps whenever a rule cannot resolve the fields, or they are not listed in the drop-down fields.  The TMP defect/symptom is just one example.  So it might help or not.

 

At this point, I suggest working with your Jira site admin to contact Atlassian support here: https://support.atlassian.com/contact/#/  If you are on a paid license your admin can submit support tickets.

They may see something in their logging that we are missing.  When you hear back from them, please post what you learn to benefit the community.

Gábor Hajdu September 20, 2023

Thanks Bill for your efforts! Sure, I'll loop back here any outcome i'll get from the support.

Like Bill Sheboy likes this
Gábor Hajdu September 20, 2023

Hi @Bill Sheboy , i think i solved the problem.

I 've changed the edit action by replacing the "...from Epic issue" options to "...from Parent issue".

With this all of the issues were updated fine!

Like Bill Sheboy likes this
0 votes
Answer accepted
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 18, 2023

@Gábor Hajdu 

Is there any chance that the issues that are having problems are Sub-tasks?

From the description, your logic seems fine, but if Jira for some reason was unable to make the copy looking at a Copy from Epic reference, it means that perhaps the issue is not associated with an Epic or it is a Sub-task.

Can you check this and if it is not the case, can you put here the example of the JQL you are using in Scheduled?

Gábor Hajdu September 19, 2023

Thanks @Fernando Eugênio da Silva  for your answer!

I've double checked, and all of my errors got on normal tasks, not sub-tasks.

Both the Task and its Epic are exists and in active state. 

I have attached images in my previous answer to Bill Sheboy. May you can take a look at them, if i am missed something necessary.

Thanks!

0 votes
Scott Jackson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 4, 2024

I'm finding that "copy from Epic issue" doesn't work reliably anymore — probably a symptom of Atlassian's retiring of Epic Link in favor of Parent Link.

Instead, you'll have to do something along the lines of these smart values, especially necessary for Sub-tasks trying to pull from Epics grandparents:

 

Tasks: {{issue.parent.key}}

Sub-tasks: {{issue.parent.epic.key}}

Suggest an answer

Log in or Sign up to answer