How do I automatically dueDate change for a parent issue based on the status of its related issues

Степан_Сычёв September 9, 2019

Disposition

There is a structure like this

Epic 1 (business epic)

  -- Epic 2 (technical epic), dueDate: 2019-01-02

  -- Epic 3 (technical epic), dueDate: 2019-02-03

Technical epics linked with business epic by "business relates to" relation (not directional relation)

I need to update business epic dueDate by MAX of Epic2 and Epic3 dueDates

Action

I have divided this situation on 3 triggers:

  1. Update business epic's dueDate when some links add to business epic
  2. Update business epic's dueDate when some links add to technical epic
  3. Update business epic's dueDate when technical epic updated or created (with link on business epic)

 

In every case I created an action to set dueDate... but I don't even known how to start. Something like 

{{#=}}MAX(issue.issuelinks .......){{/}}

How can I do this?

2 answers

1 accepted

0 votes
Answer accepted
Степан_Сычёв November 7, 2019

I have found solution by myself:

  1. Create a webhook #1 (incoming parameter is json with business-epic key, maxDueDate)
    1. Read maxDueDate from incoming parameters and set it to business-epic
  2. Create a webhook #2 (incoming parameter: business-epic key)
    1. Create selector for all related technical-epics (and check group parameter is sets to ON)
    2. Call webhook #2 with this as custom data: 
      1. Parameter to webhook: ?issue={{triggerIssue.key}}. And custom data is: 
      2. {
        "maxDueDate": "{{#=}}MAX({{#issues}}{{dueDate.format("yyyyMMdd")}}{{^last}},{{/}}{{/}}){{/}}"
        }
  3. Create trigger for
    1. Add link for technical epic OR change due date for technical epic - call webhook #1 (and pass as parameter business-epic witch was added)
    2. Add link for business epic - call webhook #1
0 votes
Степан_Сычёв September 17, 2019

Anybody?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events