Forums

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

How to set Baseline Dates to match Target Dates

Isabella Musial
Contributor
January 2, 2024 edited

I am trying to create a Manual Automation Rule that would set the Baseline Dates to match Target Dates. 

  1. IF Baseline Dates are empty
  2. AND Target Dates are populated
  3. THEN set Baseline Dates to match Target Dates
  4. SO:
    1. Baseline start date = Target start
    2. Baseline end date = Target end

My Rule: 

BaselineMatch1.PNG

However, I get an Error editing issues

DTO-11807 (Error parsing date string: (customfield_16818))

I also tried just using the following in place of the "More Options".

BaselineMatch2.PNG

 

The Audit Log shows it was successful, but the field did not update.
I think my error is in the JSON, but could be wrong. I have tried the following in "More Options": 

"customfield_16818": "{{issue.Target start.startDate.jiraDate}}"

"Baseline start date": "{{issue.Target start.startDate.jiraDate}}"

"customfield_16818": "{{issue.Target start.startDate.jiraDate}}"

"Baseline start date": "{{issue.customfield_10103.startDate.jiraDate}}"

 

Thank you in advance for your help! 

 

3 answers

1 accepted

2 votes
Answer accepted
Isabella Musial
Contributor
January 2, 2024

GOT IT!!! 

I was definitely overthinking it! This worked.

BaselineMatchFINAL.PNG

0 votes
Ryan M
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.
January 2, 2024 edited

Is there a chance that the fields are of different types, for example date vs date time, therefore inputing the wrong formatting for the field value?

Can you try adding a log option before the "edit issue" and try to use that to print what the smart value for {{issue.Target Start.startDate.jiraDate}} is to the audit log to make sure that value exists and is correct?

 https://support.atlassian.com/cloud-automation/docs/debug-an-automation-rule/

Isabella Musial
Contributor
January 2, 2024

Thanks! I just tried that - didn't really return anything in the Audit Log. I may be doing something wrong, though.

0 votes
Clark Everson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 2, 2024

Hello,

I don't have those fields in my instance or even comparable ones to test but the JSON may possible be off. Myspacing below maybe off but even the target fields have custom field values so possibly try that

{ 
"fields": { "customfield_XXXXX": "{{issue.customfield_YYYYY.jiraDate}}"
}
}
Isabella Musial
Contributor
January 2, 2024

I tried that one, too.... that didn't do it. My Baseline start date still did not update sadly. Audit Log says no actions performed.

 

{
"fields": { "customfield_16818": "{{issue.customfield_10103.jiraDate}}"
}
}

Isabella Musial
Contributor
January 2, 2024

This may not be related to this response, but I also tried using the dropdown and selecting Baseline start date (customfield_16818) and entering the Target start (customfield_10103).

 

My Audit Log shows success - but the Baseline start date was not updated. 

BaselineMatch3.PNG

Isabella Musial
Contributor
January 2, 2024

Also tried the following in the Baseline start date field (above) to no avail! 

{{Target.startDate.jiraDate}}

{{Target start.startDate.jiraDate}}

Audit Log keeps telling me that my issue was edited successfully... 

Suggest an answer

Log in or Sign up to answer