You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cvprac version: v1.0.7
cvp version tested: 2021.3.0
When calling api.change_control_available_tasks() I would expect that only unassigned tasks are returned. Instead it looks like any tasks that are in the workOrderUserDefinedStatus: Pending state are returned.
It looks like none of the ccId values are updated when a task is assigned to a CC e.g (taskId 20 is assigned to a CC).
yes, unfortunately this is a big caveat with the Task API, which is one other reason why it is going away in the near future. There's no easy way to get the assignable tasks, without a lot of work, basically you'd have to get all the CCs and go through each stage and check if any stage has any taskIDs that match your pending Task list, but not sure if that's worth the effort; the UI unfortunately is reading this directly from the db, but does a similar yet less expensive operation to figure this out
I think a better solution would be to create/execute/schedule change controls from the tasks you generate with your scripts, as you will always get the taskIds for each of your actions like adding configlets, moving devices, etc.
Get pending tasks from workOrderUserDefinedStatus: Pending | Failed (since failed tasks can be re-run)
Go to cvp:/changecontrol/taskMap to see which CC a particular task is/was assigned to. If the CC is pending then this task is not assignable. If the CC has status:failed then the task is assignable.
cvprac version:
v1.0.7
cvp version tested:
2021.3.0
When calling api.change_control_available_tasks() I would expect that only unassigned tasks are returned. Instead it looks like any tasks that are in the
workOrderUserDefinedStatus: Pending
state are returned.It looks like none of the ccId values are updated when a task is assigned to a CC e.g (taskId 20 is assigned to a CC).
But at the same time:
The text was updated successfully, but these errors were encountered: