Forums

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

Update a subtask field when a parent field changes

Martina
Contributor
February 17, 2024

Hey all, 

I've been trying to create a rule that does the following:

whenever the field of a task is changed, then update a specific field in a specific set of subtasks.

Here's what I created: 

Screenshot 2024-02-17 at 16.18.23.png

I also tried: {{issue.Install_Date.minusBusinessDays(2)}} but it isn't working

 

The rule works, and it runs, but it doesn't update the field in the subtask. I tried replacing the due date smart value for a specific date by clicking on 'pick a date' and it works, so I assume the problem is with the smart value I wrote. 

 

For context, due date is on the subtask and install date is on the task (parent) aka 'order' 

 

Any help is appreciated, thanks in advance!!

2 answers

1 accepted

3 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.
February 17, 2024

Hi @Martina 

There are a few things to check / adjust in your rule:

What is the field type for "Install_Date"?  Is it a date picker field, or something else?

 

Have you confirmed that is the correct smart value for the field, Install_Date?

Smart values are name, spacing, and case-sensitive.  And often the smart value does not match the displayed field name on the issue views.  The steps below help to identify the correct smart value (and custom field id) for supported fields for automation rules.

The essential steps are:

  • identify an issue which has your field(s)
  • call a REST API function with a browser to search for your issue:
https://<yourinstanceurl>/rest/api/2/issue/<issuekey>?expand=names
  • search on the page for your field, such as with CTRL-F
    • if you find the field, you will also find the smart value, custom field id, and structure / attributes it has
    • if you do not find the field, it may not be supported by automation rules

 

Finally, and assuming the field type is date picker and the smart value is correct...

In the edit, you want the source to be the parent (trigger issue), correct?  If so, please change that edit action to use:

{{triggerIssue.Install_Date.minusBusinessDays(2)}}

If the name and type of Install_Date are different, please adjust this accordingly.

 

Kind regards,
Bill

Martina
Contributor
February 17, 2024

Thank you so much Bill!

 

To your question, yes, Install_Date was a date picker and so was due date. Also, I was using the correct capital and non-capital letters. 

 

I changed the smart value condition for the edit action to:

{{triggerIssue.Install_Date.minusBusinessDays(5)}}

and it worked!! thank you so much!

 

Have a great day,

 

Martina

Like • Bill Sheboy likes this
0 votes
Humashankar VJ
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.
February 17, 2024

Interesting

Suggest an answer

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

Atlassian Community Events