Forums

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

Turns start date equals due date in differents subtasks

Douglas Oliveira
Contributor
September 13, 2021

Hi,

 

How do i turn star date of a subtask to be the same of the due date of another subtask?

Note:  I have some subtask with differents names.

2 answers

1 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 13, 2021

Hi @Douglas Oliveira 

What is the relationship in Jira between these sub-tasks?  For example, do they have the same parent, are the linked, etc.?

  • If this is a one-time change, and these are two unrelated sub-tasks, you could directly edit those fields using the UI
  • If instead you need this change/edit often and there is a relationship that can be determined from the issue fields, you could use automation rules to make the change

Kind regards,
Bill

Douglas Oliveira
Contributor
September 14, 2021

Hi @Bill Sheboy , Thanks for feedback.

 

They have the same parent, and i want wich the rule repeats ever.

I tried use the automation but the function wich i used not work it.

i used: {{Subtask1.startDate.isEquals(Subtask2.dueDate)}}.

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 14, 2021

Hi @Douglas Oliveira 

You cannot reference the sub-tasks as you have noted in smart values; each is its own issue, and I expect you will need to use some branching and/or created variables to do this in a condition.

Please post an image of your rule as that will provide some context for the community to offer more specific suggestions.  Thanks!

Douglas Oliveira
Contributor
September 14, 2021

Hi @Bill Sheboy , folow the picture 

 

image.png

 

 

Note: Cadastro and Produção are Subtasks

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 14, 2021

Thanks for that information!

Okay, the isEquals() function returns true or false, and not a date.  The key here is how to find the sub-task that you want to update and to give that a date field.  Let's assume there is one-and-only-one Produção sub-task with the same parent as the Cadastro sub-task.

If so, it seems like what you are asking to do is this:

  • trigger: due date changes value
  • condition: issue type is Cadastro (which you note is a sub-task type)
  • branch: on JQL to return the sub-task to update
parent = {{triggerIssue.parent}} AND issueType = "Produção
  • action: edit issue to set the Start Date to {{triggerIssue.duedate}}

 

Please check/confirm your issue type spelling as I was copying from our posts.

Douglas Oliveira
Contributor
September 14, 2021

Exactly, they have the same parent and i want wich the "Produção" start date are the same "Cadastro" due date always. If i to change one, will change the other.

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 14, 2021

Yes, I understand.  Then you will need 2 rules to keep these fields in synchronization:

  • The rule I provided above, and
  • A second and opposite rule, which detects a change to Start Date in one sub-task in order to update the Due Date in the other.  You should be able to create that by copying and adjusting the first rule.

Please note: because these two rules could create a "dead-lock" situation by altering the same fields, you will want to alter the triggers so they only fire for "edit issue" and you will want to add a condition after the trigger that the edit was not done by automation:

  • user condition: user  "Who triggered the event" is not the "Automation for Jira" user
Douglas Oliveira
Contributor
September 15, 2021

Nice!

Only the first rule work it good and did wich i wanted.
Using the JQL branch and the correct trigger the rule worked good.

Thanks @Bill Sheboy !

Like Bill Sheboy likes this
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 15, 2021

Awesome; I am glad to learn that helped.  Please consider marking this question as answered.  That will help others in the community with similar concerns find solutions faster.  Thanks!

Like Douglas Oliveira likes this
0 votes
Douglas Oliveira
Contributor
September 14, 2021

Hi @Bill Sheboy , Thanks for feedback.

 

They have the same parent, and i want wich the rule repeats ever.

I tried use the automation but the function wich i used not work it.

i used: {{Subtask1.startDate.isEquals(Subtask2.dueDate)}}.

Suggest an answer

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

Atlassian Community Events