Error: Agent is not available at specified time when trying to assign Work Order Tasks to a person

prudhvig
Tera Expert

Hi,

I have Work orders which create work order tasks. I am unable to assign them to a person and get the following issue:

Screenshot (737).png

This shows up even when the person is available and free. What needs to be done here? Please let me know.

Thanks in advance.

10 REPLIES 10

payal13
Kilo Contributor

Date Checks BR causes this error. This BT inturn calls another script include.

I am having hard time getting rid of this message in custom table which is extending sm_task table.

It occurs only on manual assignment and not if the assignment is done via script.

ANd specifically want to mention that there is a code snippet which check

 

function dateRollupIntegrityScheduled(current) {
(new SMDateValidation()).validateEstimated(current);

// check for agent scheduling conflicts
if (!current.assigned_to.nil()) {
if ((new sn_sm.SMConfiguration()).isEnabled(current, "use_schedule", "false")) {

if ((new sn_sm.SMConfiguration()).isFollowTheSunEnabled(current, "false")) {

if (current.assignment_group != null && current.assignment_group.manager != null) {

if (current.assigned_to != current.assignment_group.manager)
{
(new SMDateValidation()).checkSchedulingConflict(current);}
}
else

(new SMDateValidation()).checkSchedulingConflict(current);
}
else
(new SMDateValidation()).checkSchedulingConflict(current);
}
}
}

In my case sassignment group manager is empty , still this code should execute??

 

 

 

 

 

 

Igor __tek
Tera Contributor

Hi, I resolved this problem by changing a scheduled start date field.
This error shows whenever I try to assign an Agent to a work order which has a Scheduled Start date in the past to the actual date.

I hope that will help you as well.

find_real_file.png

Daniel50
Kilo Guru

Same Problem with one of my workers as well: https://community.servicenow.com/community?id=community_question&sys_id=da97c1dddbaf6010fb4ae15b8a96...

Timetables are ok. Other collegues from the same team have no such problems. ... 

Chaithanya10
Tera Contributor

Hey,

Can you try to change the configuration for 'Assignment method for tasks' to 'using auto-assignment' and try to click on 'Auto-assign'/assign to me'. Then It wont give that error.

 

Thank you.

Daniel50
Kilo Guru

@Chaithanya

But your solution would not solve the issue for the dispatcher, right?

Daniel