How to update Project Start Date and Due date according to Epic earliest start date
Asked by Petar Cvetanovic:

Trigger:  
When the Project issue type is transitioned to status DONE  

Action:  
Edit the Project Start Date and Due Date according to the earliest start date and last end date of the Epic.   
The link type is custom, also. It is called Timeline  

<br />

More detailed info, see video -

<https://www.loom.com/share/ed85a3b4a0a44008a29a8909399d4bfc>


Answers:
author: Marc - Devoteam
body: Hi [@Petar Cvetanovic](/t5/user/viewprofilepage/user-id/5181502)

It might be as simple to use "issueLinkType = Timeline" in the lookup action.

Would that help you further.

This as I see you use linked issues and not Jira Plans hierarchy, then you would be able to use the "Parent" field.

The parent field always was in the system in Jira Plans (Jira Advanced Roadmap) is available.

The field Epic Link has been migrated to this Parent field as well. Epic Link has been depricated

comments: author: Petar Cvetanovic
body: Not working unfortunately :(


author: Petar Cvetanovic
body: ![Screenshot 2024-07-10 at 14.08.18.png](https://community.atlassian.com/t5/image/serverpage/image-id/334624iC6689D84CEEEEF10/image-size/large?v=v2&px=999 "Screenshot 2024-07-10 at 14.08.18.png")


author: Marc - Devoteam
body: Hi [@Petar Cvetanovic](/t5/user/viewprofilepage/user-id/5181502)

Can you provide me the JQL in the lookup, according to the error in the log it seems not to be correct.

What are the in- and outbound references fro the link Type Timeline, are they timeline for both or do they differ?


author: Marc - Devoteam
body: If I look at it again:

JQL could be: type = Epic and LinkType = Timeline and "Start Date" is not empty.

There is no need for smart value trigger issue in the lookup in my opinion.


author: Petar Cvetanovic
body: "issueLinkType = Timeline" = {{triggerIssue.key}} and "Start Date" is not empty  

video explanation - <https://www.loom.com/share/e83c3187c7a54ba8ad2dac52f8de3257>


author: Marc - Devoteam
body: Hi [@Petar Cvetanovic](/t5/user/viewprofilepage/user-id/5181502)

I just replied before you.

JQL could be: type = Epic and LinkType = Timeline and "Start Date" is not empty

Or another option key = {{trigger.issue}} and LinkType = Timeline and "Start Date" is not empty


author: Petar Cvetanovic
body: Not working. Can you send me a SS how the whole should look like?  

<br />

This is what i got  

![Screenshot 2024-07-10 at 15.16.05.png](https://community.atlassian.com/t5/image/serverpage/image-id/334648i61D5577F67EBBF89/image-size/large?v=v2&px=999 "Screenshot 2024-07-10 at 15.16.05.png")


author: Marc - Devoteam
body: Hi [@Petar Cvetanovic](/t5/user/viewprofilepage/user-id/5181502)

Replace LinkType with issueLinkType.

LinkType is an option from an app on my instance.


author: Petar Cvetanovic
body: Ok

* Next step is to lookup only issues that are related to transitioned project not all of them
* Query finds 5080 ticket

![Screenshot 2024-07-10 at 15.51.43.png](https://community.atlassian.com/t5/image/serverpage/image-id/334663i7EC6D99C856E37CB/image-size/large?v=v2&px=999 "Screenshot 2024-07-10 at 15.51.43.png")


author: Marc - Devoteam
body: Hi [@Petar Cvetanovic](/t5/user/viewprofilepage/user-id/5181502)

Then try the other JQL I provided:

key = {{triggerissue.key}} and issueLinkType = Timeline and "Start Date" is not empty


author: Petar Cvetanovic
body: Still not working

![Screenshot 2024-07-11 at 10.13.14.png](https://community.atlassian.com/t5/image/serverpage/image-id/334907i9E0CB2BD62311F06/image-size/large?v=v2&px=999 "Screenshot 2024-07-11 at 10.13.14.png")![Screenshot 2024-07-11 at 10.13.37.png](https://community.atlassian.com/t5/image/serverpage/image-id/334908i204A950979438FA1/image-size/large?v=v2&px=999 "Screenshot 2024-07-11 at 10.13.37.png")


author: Marc - Devoteam
body: Hi [@Petar Cvetanovic](/t5/user/viewprofilepage/user-id/5181502)

Complete other option.

Before the lookup, create a variable. Give the variable a name and use as smart value {{triggerIssue.key}}

Then in your lookup perform the JQL as follows:

issueLink = {{variable-name}} and issueLinkType = Timeline and "Start Date" is not empty

Add a log action to log the result of the lookup, log action should contain only: {{lookupIssues}}

This should present the linked issue keys.

The do the edit


author: Petar Cvetanovic
body: Working thank you for the support !!!!   


author: Dave Mathijs
body: Hi [@Petar Cvetanovic](/t5/user/viewprofilepage/user-id/5181502) I wouldn't be able to immediately answer your question, but I just wanted to say that I love the fact that you made a **Loom** video to provide context to your question, well done!

comments: author: Petar Cvetanovic
body: Thanks. I would really appreciate the help


Tags: cloud

jira-cloud