Forums

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

automatic rule for sub-task to inherit a custom date field from its parent

Martina Hurtečáková
Contributor
July 16, 2024

Hello, 

I´m new in automatic rules in Jira cloud and I tried to google for solution to my problem  but haven´t found it.

We want the sub-tasks to inherit a custom field "Deployment Prod" (it´s a date field). this field can be filled in in the parent at any time (no status or transition specified). 

I tried several ways but none of them is working. please see attached my 3 attempts and assist me on setting it up. thanks a lot, Martina

 attempt3.pngattempt2.pngattempt1.PNG

2 answers

0 votes
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.
July 16, 2024

Hi @Martina Hurtečáková 

How accurately do you need the field in the subtasks to be, regarding a match to the parent issue?

That will determine how many automation rules you need, and which triggers they use.  For example, you could have at least this many rules:

  1. when a subtask is created, copy the field from the parent issue
  2. when a subtask is edited to manually alter the field, set the value back to the parent's value
  3. when a subtask changes its parent, copy the field from the new parent issue
  4. when a parent issue changes the field, update the value in any subtasks
  5. when a subtask is converted to another issue type, what should happen to the field value?
  6. etc.

Kind regards,
Bill

Martina Hurtečáková
Contributor
August 1, 2024

Hello, 

sorry to come later to you. 

Do I understand you correctly that instead of 1 rule I need so many?

I reviewed those provided by you and we need the first 4 rules (1.-4.). But I realized it should not be for field Due date but for a custom field called "Deployment Prod" (Type: date time picker). Could you please support me on the steps for creation of the rules? 

thanks a lot

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.
August 1, 2024

First, please stay engaged with the help @Tessa Tuteleers is providing so you get one rule working correctly.

Then, after you have decided the scenarios needed, you can copy that rule and adjust the triggers / conditions, as needed.  For example with the Issue Created scenario...

  • trigger: issue created
  • action: re-fetch issue
  • ...previously identified conditions and actions to update your field

 

Like Tessa Tuteleers likes this
0 votes
Tessa Tuteleers
Community Champion
July 16, 2024

Hey @Martina Hurtečáková ,

In all cases, your condition speaks of the parent issue. You assume that you would start the rule from the subtask itself. But the trigger here would be the parent, not the subtasks (as the change in the field happens on the parent.

Meaning -> If you change the duedate of the parent issue, start the rule with the parent and and then copy that date to all subtasks. 

Your condition should be on the issue itself, not its parent. 

It looks like your first screenshot is the closest attempt

  1. When the field of an issue is changed -> correct
  2. Check if the issue is the right issuetype -> not correct: unteraufgabe is the subtask I'm assuming? You are going to trigger this rule and allow it when you change a duedate on a subtasks, and then copy that field to its subtasks (which do not exist)
  3. Check if the field is not empty -> not correct: this needs to be on the issue itself, not the parent
  4. For subtasks: copy date field from issue -> I don't know how you configured that one, please provide a screenshot if the above does not work.

Hope this helps!

- Tessa

Martina Hurtečáková
Contributor
August 1, 2024

Hello @Tessa Tuteleers , 

thank you for trying to help me but I wasn´t successful in solution.

first of all I need the rule(s) to be created for another custom field called "Deployment Prod" (Type: Date time picker). and I changed the rule as follows:

deploymentprod.PNG

Aufgabe= Task.

and Audit log shows success. however in the tickets it´s not performed.

  • Task is 8245
  • Sub-Task is 8246

auditlog.png

I will be grateful for any kind of support, how the rule needs to be set up, to ensure that the "Deployment Prod" field in every sub-task is filled in based on its parent issue (Epic, Task, or Story), doesn´t matter if by creation or edition. 

Thank you, Martina 

Tessa Tuteleers
Community Champion
August 2, 2024

Hey @Martina Hurtečáková , 

please use the following format for your smartvalue: 

{{triggerIssue.Deployment Prod}}

You need to use the actual name, OR the ID in the following format (you get the ID for the field when editting the actual custom field)

{{triggerIssue.customField_fieldId}}

 

The action is succesfull because you do add something to the field. only the smartvalue you are using doesn't exist so it returns an empty value. 

 

Please let me know if that works. 

-Tessa

Like Bill Sheboy likes this
Martina Hurtečáková
Contributor
August 2, 2024

@Tessa Tuteleers - yes it works! my smartvalue was wrong. thanks a lot

Like # people like this
Tessa Tuteleers
Community Champion
August 2, 2024

Good to hear @Martina Hurtečáková

Thanks for letting me know it worked ☺️

Please accept my answer, that way  other users can find the answer faster if they have the same question.

 

Have a great weekend!

- Tessa

Suggest an answer

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

Atlassian Community Events