Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to make a linked issue the parent of the original issue via automation?

d_kamposos August 1, 2024

Hello all,

I have 2 issue types, 'Eng.Problem' and 'Change Request' (CR). Their issues are connected with a custom link 'solves - is solved by', where a problem is solved by one or more CRs and a CR solves exactly 1 problem.

This worked fine, until we decided that we want a parent-child relationship between them. So I 'upgraded' Eng.Problem to level 2 hierarchy and CR to level 1, so now a CR can be the child of a problem.

The final step is to take the linked problem from every CR and assign it to the parent field. I tried to do it with an automation but I keep getting the same error (data was not an object(parent)).

crs.png

2 answers

1 accepted

2 votes
Answer accepted
Sebastian Krzewiński
Community Champion
August 1, 2024

Hi @d_kamposos 

 

I think you are using wrong json to set parent. Please check this thread - https://community.atlassian.com/t5/Jira-questions/how-to-update-the-parent-field-of-an-issue-with-API/qaq-p/2574491

 

Regards,

Seba

d_kamposos August 2, 2024

Thank you @Sebastian Krzewiński , that's what I needed!

Like Sebastian Krzewiński likes this
1 vote
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.
August 1, 2024

Hi @d_kamposos 

Please post an image of the audit log details showing the rule execution.  That may help provide more context for this symptom.  Thanks!

Until we see that...

You could restructure your rule to only process when there are issues to update.  For example...

  • trigger: scheduled with JQL to find CR issues without a parent and which have your linktype
  • action: edit the parent field directly, setting the value to the smart value expression for the linked Problem issue
  • Do you also want to remove the link after setting the parent?  If so, continue the rule with...
  • action: re-fetch issue
  • action: delete the issue link of the specific type

Kind regards,
Bill

d_kamposos August 2, 2024

Hello @Bill Sheboy 

My problem was the wrong JSON format that I used, so I accepted Sebastian's answer, but thank you for always being helpful and pointing out additional concerns!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events