How to assign a catalog task to the requester of a service catalogue item using it's workflow?

hmarsh
Kilo Contributor

Hi, this will probably be a really simple question to answer...

I have built a workflow for a specific service request. I have created a catalog task but I don't know how to assign it to the requester? I guess this would require some scripting to assign it to the requester as it could be someone different every time?

Thanks,
Hugo

1 ACCEPTED SOLUTION

Jim Coyne
Kilo Patron

Technically an "Advanced script", but actually a real simple one 🙂



...should do it for you. That will assign it to whoever ordered the item, but if you meant who it is for (users can order things for other people), then this will do it:



task.assigned_to = current.request.requested_for;


View solution in original post

3 REPLIES 3

Jim Coyne
Kilo Patron

Technically an "Advanced script", but actually a real simple one 🙂



...should do it for you. That will assign it to whoever ordered the item, but if you meant who it is for (users can order things for other people), then this will do it:



task.assigned_to = current.request.requested_for;


Hi Jim,

I've tried your suggested line since I have the same requirement, but it doesn't seem to be assigning to any user. If anything the task will assign to the previous fulfiller of the other task.

Any suggestions?

Thanks,

Grace

hmarsh
Kilo Contributor

Thanks, that works perfectly! 🙂