Due to various reasons it can happen that a task on a system ends up without any user available to process it. This may happen because roles users / groups or roles that define assignees to a task are empty (no performers are configured) or the assignees were deleted and no longer exist. The first script provided here identifies these tasks and prints them out in a JSON format or saves them in a JSON file. With the second script it is possible to reassign these tasks based on some rules. They can be downloaded from the bottom of this page.criterias.
The scripts uses REST calls to communicate with the target system. If the target system returns an error status code, the error details will be printed on the command line.
...
This script identifies tasks without any users and print prints them out in JSON.
Parameters
...
This script provides some basic functions to reassign the tasks you can use:
reassign all tasks to another user:
...
This function loops through all tasks and reassigns a task to a user with the given ID if the property has the expected value. If not, this the task will be skipped and not reassigned.
...
This function loops through all tasks and reassigns a task to a user with the given ID if the condition applies. If not, this the task will be skipped and not reassigned.
...
If the task has no variable with the given name, it will be skipped.
You can find some examples on how to call these functions in the script.
Example
This script needs a list of tasks that should be reassigned. You can provide this list either ...
...