Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Assigning tickets depending of the hour of the day

Hi, in my Service Project I have two teams, one of them manages the issues created during the day time (until 17h CEST) and the other one manages the issues created during the nigh time (from 17h CEST).

 

I'm trying to automate the assignment process but I'm not being able to find a condition matching my criteria, I tried something like a JQL query as this one:

{{(now.plusHours(7).jiraDate).compareTo(now.plusDays(1).jiraDate)}} = 0

It doesn't work at all, but I'm trying to add 7 hours to now in order to compare it with tomorrow, if now+7 = tomorrow, it means that now is after 17h. I don't know if it is the best way to do it (I guess it is not), but I've not been able to find any doc to help me.

 

Best regards.

2 answers

2 accepted

1 vote
Answer accepted
Hana Kučerová Community Leader Apr 15, 2021

Hi @Manuel Maldonado

welcome to the Atlassian Community!

I believe you can use JQL condition for this, something like:

created >= startOfDay(9h) AND created <= startOfDay(17h)

 If issue is created between 9 AM and 5 PM, then ...

Hi @Hana Kučerová thanks so much for your solution, I I didn't get it to work but I think it was because of the timezone, as my test were done assuming that the dates would be at CEST and they are actually at GTM.

 

However, I finally took @Bill Sheboy solution and (after noticing it was failing because of the timezone) it worked!

 

Thanks so much anyway!

Like Hana Kučerová likes this
1 vote
Answer accepted

Hi @Manuel Maldonado  -- Welcome to the Atlassian Community!

You can also do this with an advanced compare and regular expression check.  Please see this post for details:

https://community.atlassian.com/t5/Automation-questions/Assigning-round-robin-according-to-the-hour-of-the-day/qaq-p/1651142

 

Best regards,

Bill

Hi @Bill Sheboy, your solution worked great, you just need to take into account that "Created" value in a JQL is always at GTM timezone. This is how it turned out:

 

Captura de pantalla 2021-04-16 a las 11.08.39.png

 

Thanks so much! 

Like Bill Sheboy likes this

I am glad to hear that worked!

The way we solve the time zone issue is to adjust it before the condition test, rather than hard-code the altered time values.  That prevents issues with time changes for DST and data entry errors. 

For example:

{{issue.created.convertToTimeZone(issue.reporter.timeZone).format("hh")}}

Like Hana Kučerová likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you