Can't compare an issue's custom date field to the same field in the trigger issue

Olie Ryan-George
Contributor
August 17, 2023

Automation I'm trying to setup: Upon removing the value from a custom datetime field, I want to remove the value the same custom field in all linked issues with the same value as the trigger issue before removing the value.

For some reason the datetimes of the trigger issue and the subject issue are in a different timezones. This means I can't do a direct comparison. This should be OK as I should be able to manipulate them to be in the same timezone. When I do this, the trigger issue's value seems to not be recognised as a date. This is whether I use fieldChange or changelog.

This is how I've setup my rule. I've deliberately put lots of logs so the behaviour can be shown. 

rule setup pt1.pngrule setup pt2.pngrule setup pt3.png

This is the result of the logs:

rule logs hd.png

Does anyone have any suggestions on how to compare these two fields?

 

Edit: Removed images and added higher quality ones

1 answer

1 accepted

0 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2023

Hi @Olie Ryan-George - welcome to the community,

Could you please provide the screenshots in higher quality? Unfortunately I can‘t read any line :-/

Best
Stefan

Olie Ryan-George
Contributor
August 17, 2023

Hi @Stefan Salzl 

Thanks and appreciate your help in advance.

I've edited my original description with more zoomed in images.

Thanks,

Olie

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2023

Hi @Olie Ryan-George 

for me this looks like the fieldChange only delivers the string data type if your date.

Could you please try to add a „.toDate“ to the date you are fetching via fieldChange.

eg.:

{{fieldChange.from.toDate}}

Best
Stefan

Olie Ryan-George
Contributor
August 18, 2023

@Stefan Salzl Hi,

This seems to be good progress as the log now matches with fieldChange using "toDate". However, even though it looks the same in the logs, it's not passing the advanced compare condition.

rule logs pt2.pngrule setup pt4.png

Any idea where to go from here?

Thanks,
Olie

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 18, 2023

Hi @Olie Ryan-George 

I guess you would only want to have the "fieldChange" value in your second value isn´t it?

It looks like there is another value before that value (as there is a '=' before the {{fieldChange...}} ). Could it be that this is a copy paste from the "log action" ?

 

Best
Stefan

Olie Ryan-George
Contributor
August 18, 2023

Hi @Stefan Salzl 

Noooo! That was a silly mistake.

All working now. Really appreciate your help!

Thanks,

Olie

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 18, 2023

Glad to know you got that working ;)

Please consider to hut the accept button next to the answer in order to mark this post as solved and make it easier for other user to find solutions to their questions ;

Best
Stefan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events