Workflow refresh Requirement Grid / Tree content without refreshing the Filter
Is there any way (via workflow) to refresh the data that is displayed in the Requirements Grid or Requirements Tree without refreshing the Filter? Let me explain:
I am using workflow scripts to do bulk updates of requirements. I am using the ActiveTreeSelection object to get access to the selected requirements and then making updates through the Req object directly. This all works well; except that after completion the Grid or Tree View are not refreshed; i.e. the changes are not reflected on the screen. The changes are made in the database.
I can execute a Filter Refresh action which does refresh the grid; but it also re-applies the filter. In case the bulk change affects a field that is included in the filter then the requirements changed may disappear from the filter.
Consider the following simple workflow procedure, which I initiate from a toolbar button:
Sub ApproveRequirements() On Error Resume Next Dim oSelectedReqs ' As List -- of all all the selected Reqs Set oSelectedReqs = ActiveTreeSelection For Each oReq in oSelectedReqs oReq.Reviewed = "Approved" oReq.Post Next 'oReq Set oReq = Nothing Actions.Action("actFilterRefresh").Execute Set oSelectedReqs = Nothing On Error GoTo 0 End Sub
Typically before using something like this my users would have setup a filter: “Reviewed: Ready for Approval’ or something like that. After the approver clicks the approve button all the approved requirements disappear from the grid/tree. This is troubling to them as they don’t get to see the result of their action.
If the lineActions.Action("actFilterRefresh").Execute is not included then the grid does not update at all.
NOTE: I'm aware of Update Selected but it doesn't meet out needs because:
- It is too hard to use; it requires many clicks for the user to set one value. This is fine for users who work in ALM every day; but for occasional users it is cumbersome.
- It is not possible to add a single multivalue item to multiple requirements. Update selected overwrites existing values; it doesn’t just append values (even if "add to existing" is selected).
- Update Selected bypasses some workflow code so changes/restrictions implemented in workflow are not in place via Update Selected.
If what you want is to have a filter defined for a field in specific and then do changes with workflow that affect this value that is been used to filter, then when it refreshes, you want to see the changes but that the filter remains intact...
If that is the case then that is not possible since the values you filtered already changed.
The changes will be applied, but they will be visible only when you refreshed the view.
Thanks for your reply.
Ideally I don't want to refresh the filter - what I want to do is to refresh the data that is displayed on the screen within the current filter. For example, in the same way that the screen refreshes when using Update Selected. When using Update Selected the values changed are immediately displayed in the grid and tree view; and the filter is not refreshed. I would like to trigger the same "update" behaviour from workflow.