I want to create Assignment Rule Based On Shift or Time

Hello,

I have tried assignment rule but I want to create it based on shift like 10AM to 6 PM (Morning Shift) and then 6PM to 10AM (Night Shift).

Can Someone provide me with the solution. Its the Basic requirement of help desk.

Hoping to get the resolution.

can you explain your requirments a bit more

Sure,

I want to create an assignment rule based on time.

If Ticket get created between 10AM to 6PM in Day I want to assigne it to the Day shift Team.
I can create assignment rule for day and it will work during that time.

If Ticket get cteated between 6PM to 12PM and 00 AM to 10 AM then those tickets get assigned to the Night shift team.

I think “Python Expression” should do the job but I have tried every possible way but it didn’t work.

I hope you can understad.

Ok i will get back to you once i add the logic

Hi @Nimesh007 so here is the condition for your assignment rule for 2 different shifts

add a field in ticket doctype with any name you suggest with field type “time” and set the default to now you can hide it or let it adjust as you need then in assignment rule set this condition

"10:00:00" <= custom_assignment_time <= "18:00:00"

for day shift and

`“18:00:00” <= custom_assignment_time <= “9:00:00”

for night shift

and set the users in the user email accounts

when the document is created it will send notification to those user and share teh task

I have tested the same created the same field but getting the error ss is given below.
image

Please check.

show me how you setup the condition and also in ticket doctype show me field properties

Hey we’ve added this feature on our roadmap and should be out in 2-3 months.

Hello sister :pleading_face:

I’m so relieved I have seen someone to talk to

Please help me to integrate ERPNext api into my EMR software, please :pray::pleading_face::pleading_face::pray::pray::pray:

Please can someone help?

Until this feature gets implemented, here is a PAINFUL way to achieve what you’re looking for:

  1. Create a custom app
  2. Create a function that will be called on validate hook. This will contain your assignment logic
  3. Update hooks.py file to ensure
  4. Restart the app

Note: This only works if you’re okay writing code and making changes to server