I am trying to create an automation that checks if a change request will occur after our scheduled CAB meetings. Our CAB meetings are always on Thursdays at 2 PM. So if the request is entered on Tuesday for a change on Wednesday, the request should be denied. If the request is entered on Tuesday for Friday, then it will go through the review process.
Everything I have done to try to make this work has not worked.
Right now I have a variable that is checking what today's day count is
{{now.convertToTimeZone("America/Chicago").format("e")}}
Then I check if that variable equals each day of the week.
And then I check if the Planned Start date is greater than today plus a set number of days til the next CAB meeting.
{{issue.customfield_10065.convertToTimeZone("America/Chicago")}}
is greater than
{{now.convertToTimeZone("America/Chicago").Days(3)}}
I'm logging all of my variables, and it shows Today's Day Count = 6. And then it says my condition didn't pass. (I've tried the 6 with and without quotes. I've put the condition as one state equals true.)
I'm not sure what I'm doing wrong or if there's an easier way to set this up?
Hello @Anne Rommelfanger
Welcome to the Atlassian community.
Can you show us the the details of the step where you create the variable that you described here?
Right now I have a variable that is checking what today's day count is
{{now.convertToTimeZone("America/Chicago").format("e")}}
Does the name you gave to the variable match exactly the name that you are using in the Log action and the IF/smart value compare step? Variable names are space and case sensitive so it needs to be an exact match.
Oh my gosh! That was it! My variable was named TodayDayCount and in the step I was using TodayDateCount. I'd been staring at it for too long and couldn't see what was right in front of me. It wasn't until I started taking screen shots for you and @Chris Rogers that I saw it. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you able to post a screenshot of your entire automation rule?
I find working dates in Automation can be a bit tricky, depending on what you're trying to do so I think we could best help you if we understand the full logic of what you're doing and where it's not working as expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.