Forums

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

How to update the (custom) date fields of sub-tasks when the main task is updated

D Davis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2018

Hi there!

We are currently trying to set up a rule for automatically updating sub-task due dates. The tricky part is that the date fields in question are two custom fields, both date pickers, format is as such: 01/Jan/18. 

 

Example:

  • Parent task's due date is originally 1/Jan/18
  • It gets updated to 1/Feb/18
  • When the issue is edited, I would like the rule to update some sub-task due dates to 1/Feb/18
  • Ideally, I would like to make some due 30/Jan/18, as they need to be done a bit ahead of other tasks. 

However, I cannot get it to work, even without the date adjustments.

 

What I attempted to do, for a test rule, was:

  1. Manual Trigger 
  2. Branching For Subtasks 
  3. Edit issue fields
    • Field to update: customfield_1
    • Copy customfield_1 from Trigger Issue

 

This rule runs successfully, but the sub-task due date for this field is never updated. What am I missing? I am very much a greenhorn in this circuit, and fully understand I might be missing something basic, so any assistance is welcome. :)

Thank you for reading!

1 answer

0 votes
Deleted user August 5, 2018

Hey there,

That rule looks good, the main thing here is to make sure that the date fields are available and visible on the subtasks. Can you manually edit these fields on the subtasks?

Can you attach a screenshot of the config for the "Edit issue" action so we can take a closer look? If there's sensitive info on it, you can raise a private support case at https://codebarrel.atlassian.net/servicedesk/customer/portal/1

Ideally, I would like to make some due 30/Jan/18, as they need to be done a bit ahead of other tasks.

For actions on adjusting the dates, see: https://docs.codebarrel.io/automation/smart-fields/working-with-dates.html

In your case you'll want to use minusDays or minusBusinessDays to set the time to be in the past. Your rule will look something like:

Project_automation_-_Code_Barrel_JIRA.png

Where your custom due date should be set to (replace "Insert your duedate field name here" with your field name)

{{#triggerIssue.Insert your duedate field name here}}func=minusBusinessDays(2){{/}} 

Hope that helps and let us know how you go!

Cheers,

Mark C

Suggest an answer

Log in or Sign up to answer