Automation can not find linked Issue to Copy Comments
Asked by Janek Looschen:

Hey all,

so i have build this Automation which copys comments to a certain parent Request Type whenever a comment is made: A Sales Order Ticket is always a parent of a Sales Order Service Ticket.  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/253970i14495FA38626AA2C/image-size/large?v=v2&px=999 "image.png")  

The Automation works just fine when i manually create a Sales Order Ticket and link a Sales Order Service Ticket to it via link issues (not Sub-task). All Comments made in the Sales Order Service Ticket get copied to the Sales order Ticket as an internal note. Done. :)  

However: This does not work in the following example which is way more important:  

We have an ERP linked to our JIRA Cloud Instance. Sales Order Tickets and Sales Order Service Tickets are almost always created automatically whenever an order including Services is placed. This process is triggered from said ERP. They have a Parent - Child Relation.  

Whenever a comment is written in a Sales Order Service Ticket, that has been created automatically the Jira Automation states to following Audit Log ( No actions performed):  

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/253976i98A48F661373B69F/image-size/large?v=v2&px=999 "image.png")  

I cant seem to find any obvious issues with our Parent Child relations in Tickets. At least I cant spot the difference between manually linked and automatically linked Tickets.  

Does anybody know what might be the root cause for the problem we are facing?  
Is this more of an internal API ERP topic?


Answers:
author: Bill Sheboy
body: Hi [@Janek Looschen](/t5/user/viewprofilepage/user-id/5205308)

If I understand your use case, I wonder if there are timing issues in the solution...

You stated that: *Whenever a comment is written in a Sales Order Service Ticket, that has been created automatically the Jira Automation states to following Audit Log ( No actions performed)*

* Are the two issues created long before the comment is added?
* Does this symptom always happen, or intermittently?

You also state this: *We have an ERP linked to our JIRA Cloud Instance. Sales Order Tickets and Sales Order Service Tickets are almost always created automatically whenever an order including Services is placed. This process is triggered from said ERP.*

* What exactly does "This process is triggered from said ERP" mean? Is this using a tool integration to create the issues, are they created with the REST API, are they created by an automation rule in the Jira instance, etc.?

Kind regards,  
Bill

comments: author: Janek Looschen
body: Hey Bill,  

Thanks for your reply  

Currently out of Office. I'll get back to you as soon as possible.  

Janek


author: Janek Looschen
body: Hey Bill,  

sorry for the long hold up.  

As for your Questions:

* Are the two issues created long before the comment is added?  
  * Yes, the Issues are created long before the first comment making it unlikely that its a timing issue.
* Does this symptom always happen, or intermittently?
  * This is always the case

<br />

The creation of a Sales Order Ticket and Sales Order Service Tickets is triggered through the ERP. They are created with a REST API. To my knowledge there are no further Jira automations involved -( but ill check this just to make sure)  

Best  

Janek


author: Janek Looschen
body: I found the issue... i guess this took me way too long to realize but here it is:  

Our ERP creates issues via REST API with the following link types:  
"parent of"  
"child of"  
I did not know that and did not bother to check...  

The Automation asks for the link types:  
"is parent of"  
"is child of"  

Furthermore, if you manually create a linked ticket in our Jira Instance its done via the "Action" bar next to the Status indicator. All of these issues are always created with the link type "is parent of" and "is child of". I thought the ERP did the same :/.  

Anyways, thanks for the help. This issue is solved :D.


author: Tony Langlet
body: Hello [@Janek Looschen](/t5/user/viewprofilepage/user-id/5205308)

Are you sure that the Linked issue is having **is child of** as the Link type and not **is backed by**, which is think is the default Link type for the automation?

comments: author: Janek Looschen
body: Hey [@Tony Langlet](/t5/user/viewprofilepage/user-id/1284310) ,

thanks for your reply.  
Yes, i iam sure that the linked issue type is in fact "is child of". That is what it says inside of a ticket.  

Is backed by is also not a link type that i can select. Is that an on prem only Link type? Typo?  

Janek


author: Tony Langlet
body: I've never bothered with the linked types but there is a section in the configuration/settings for Jira where you actually create the Link types, happy I learned something today...

Are the tickets created in different Projects?

Try making a test automation with a manual trigger (to avoid incidents) and change the link types to allow all and see if works, like [@John Funk](/t5/user/viewprofilepage/user-id/7148) mentioned.


author: Janek Looschen
body: Hey [@Tony Langlet](/t5/user/viewprofilepage/user-id/1284310) ,

the tickets are all created in the same Jira Project.  

Ah, yes, that could do the trick. I'll try it out and get back to you and John :)  

Thanks so much for the help  

Janek


author: John Funk
body: Hi Janek - Welcome to the Atlassian Community!

That's certainly weird. If you create a filter- maybe something simple like key in (ABC-123, ABC-456) where 123 is a manually created one and 456 is an auto created one - then in the results of the filter displayed the Linked Issues field. See if you see any differences there.

Also, will the auto created issues have any other links other than the one child? Thinking if no, that maybe just using linked issues versus using the specific "is child of" to see if that helps.

comments: author: Janek Looschen
body: Hey [@John Funk](/t5/user/viewprofilepage/user-id/7148)

thanks for your reply.  
I\`m afraid i did not fully understand your suggestion.  
I sould build a JQL Filter one that looks up an Automatically created child and one that looks up a manually created one?  

The Automatically created Ticket can have multiple Child Tickets. The amount of linked Child tickets is dependant on how many Services are sold within the placed order of our customer.  

Thanks for the help   

Janek


author: John Funk
body: Was just trying to compare the results of the links with a filter for each type created to see if there was something different about the.

Also, can you answer my last question?


author: Janek Looschen
body: Hey John,

sorry for the long Hold up.  

I checked if there are any differences for the JQL Filter when looking for automatically and maually created tickets.  

JQL to look up the issues:  
project = ESD AND "Request Type" = "Sales Order Ticket (ESD)" AND Issue in linkedIssues("ESD-4709")  

The results for are the same unfortunately. In both cases the query shows me the parent Issue.  

The Automatically Created issues are created Via REST API. Maybe that info helps.  

In the meantime ill try to work on my Automation and see if i can fix it myself :)  

Sorry again for the long wait and thanks for the help   

Janek  


author: Janek Looschen
body: I found the issue. Answer is above :)  

Thanks for the help, Issue solved.


Tags: issue-link

link