Forums

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

Automation for Jira Update date fields based on other issue fields

Thales Dos Santos September 25, 2020

Hello, I am wondering if someone can help me here.

I am trying to configure the following rule:
automation issue.png
in the edit issue step, the following configuration is set:

{
"fields": {
"customfield_14609": "{{issue.customfield_10700.jiraDateTime}}",
"customfield_14610": "{{issue.duedate.jiraDateTime}}"
}
}

The rule works, but it's always one day behind. Our jira timezone setting is set to system's default, which is CEST (GMT +2:00), and my user profile is using the same.

automation issue 2.png

The expected:
Target end (customfield_14610) is the same as Due Date
Target Start (customfield_14609) is the same as Start Date (customfield_10700)

Thanks,

Thales

2 answers

1 accepted

0 votes
Answer accepted
Thales Dos Santos November 26, 2020

If someone comes across the same problem, we came to the conclusion that the problem is actually with the fields "Target Start" and "Target End". These fields are created by Portfolio for Jira (Advanced Roadmaps), and it's related with BUG JPOSERVER-2358

0 votes
Marco Brundel
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 25, 2020

Hello,

Is it an option to use another variant instead of JiraDateTime?
See https://confluence.atlassian.com/automation/date-and-time-functions-993924864.html

regards, Marco

Thales Dos Santos September 25, 2020

Hello @Marco Brundel thanks for the answer, appreciate you taking the time.

So I tried using .shortDate and even .withHour(20) to see if that could fix the timezone thing (my initial suspicion).

None changed the outcome, but if I do this:

{
"fields": {
"customfield_14609": "{{issue.customfield_10700.plusDays(1)}}",
"customfield_14610": "{{issue.duedate.plusDays(1)}}"
}
}

It works:

Due: 21/Dec/20
Start Date: 01/Oct/20
Target start: 01/Oct/20
Target end: 21/Dec/20 

But deliberately adding +1 day in the code so the dates match look a bit weird, right?

Marco Brundel
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 28, 2020

Hi @Thales Dos Santos 
This is indeed weird that this would be necessary.

For the sake of completeness:

When you look at General configuration what is the “default user time zone” in your Jira?

And if you create or change an issue by yourself, is the correct time shown in the history of the issue?

Thales Dos Santos September 28, 2020

Yes, the system default timezone is 

Default user time zone = System default: (GMT+01:00) Amsterdam

My user's profile is also set to use the Jira default.

And the time in the history is correct.

I have raised a ticket to Atlassian Support about this, hoping they will know something.

Let me know if you have any other insights.

Thales

Marco Brundel
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 28, 2020

Hi,
how does it work if you don't have the fields filled via "additional fields", but by selecting them via "choose field ..." and then choosing to copy from current issue?

 

In this screenshot is Planned a custom field, type date picker.

 

regards, MarcoScreenshot 2020-09-28 at 15.42.42.png

Thales Dos Santos September 28, 2020

Hi,

The fields I am trying to change don't appear in the list, it tells me to use the advanced section:

Screenshot 2020-09-28 at 16.06.02.png

Like Liam Harley likes this
Liam Harley
Contributor
September 15, 2021

As above,  I want to update the Target Start of one subtask based on the value of the Target Start of another,  but field is not in the edit list..   Was there an answer? or alternative solution.

@Thales Dos Santos 

 

or did I just find the answer.  when I re read the comments again..

The expected:
Target end (customfield_14610) is the same as Due Date
Target Start (customfield_14609) is the same as Start Date (customfield_10700)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events