Automatically set owner in actions?
![]()
Is it possible somehow to automatically set the owner of a work item when doing a workflow transition?
I'm building a helpdesk database with RTC and work items. The roles are Analysers and Customers. I have states for analysing work items and a state for requesting more info from the customer.
The process is like this:
1. The customer creates the work item
2. A manager assigns the work item for analysing to a specific analyser.
3. The analyser checks the work item and realise he needs more info from the customer.
4. The customer adds the missing info and return it to the analyser.
In step 3 and 4 I don't want the users to scroll a big listbox in order to find the correct user (Customer or Analyser). The information is already in the work item, so I would like to programatically set the analyser or customer when doing the transitions.
Is this possible?
|
One answer
![]()
Hello Henrik,
I would create 2 attributes that will not be presented (hidden) - customer and analyzer
creation: customer attribute is set based on creator id
assign: set analyzer attribute based on selected value.
I would use a value set provider to set these values.
I suspect that based on status - investigating or need more info - you want to set the "owner" of the work item
(the person in charge of the next / pending action).
I would use a calculated value set provider - https://jazz.net/library/article/1003/#calc-values
and set owner based on workflow status.
if status = need more info
return owner is customer attribute id
else
return analyzer id.
Let me know if the above makes sense,
or if more details needed.
Thanks,
Eric
Comments Thanks! I will try this out and let you know the results. 1
The problem with calculated value providers for the owner attribute is, that it always needs to calculate. That is why we suggest to make calculated attributes read only. In addition the attribute customization is always for all work item types. So you can't easily limit them to just a special type.
Thanks for the info. I'll keep this in mind. Developing a server based participant is more difficult. Especially the deployment part as I'm not the admin of our server. I have done this successfully with a server side extension as Ralph has suggested (Based on his create work item approval example).
I created a server side extension called "update owner on state change" to which we pass the work item state we want to update on and the name of the attribute containing the user who should take ownership.
|