March 25, 2015

Making Sure New TestTrack Items are Immediately Assigned

Helix ALM
Have you ever wondered if there was a way to make sure new items are assigned to a user as soon as they are added to TestTrack, so your project does not contain a large number of items that are not assigned? Here are a couple of solutions that can help you do just that. Note: The following solutions use trigger rules to make sure new items added are assigned to users. Issues are used in the example configurations, but the information can also be used to assign new requirements, documents, and test cases.

Solution 1: Create a trigger that assigns items based on the value set in a custom assignment field

This solution uses a trigger rule to automatically assign new issues based on the value set in a custom field. First, create a custom assignment field that lets users select who to assign new issues to. Because issues will be assigned to different users as they move through the workflow, consider using a field name that clearly indicates the field is only used to set the initial assignment for new issues. After the field is added, you will update the security privileges to make sure it is only available when users add issues. More on that later. The assignment field should be a Pop-Up Menu field that uses the Users value list. Display the field on the Main Issue Window so users can easily see it and be sure to select Supports multiple selection if you want users to be able to assign new issues to more than one person. AddCustomFieldAssignedTo After the assignment field is added, create a trigger that enters an Assign event when new issues are created and uses the value set in the assignment field to determine who to assign them to. In the Add Trigger Rule dialog box, leave the Precondition setting as Not Filtered so the trigger applies to all new issues. Click the Trigger When tab to specify that the trigger should run when a new issue is created and before it is saved. Click the Actions tab to add an Enter event action. The trigger should enter an Assign event and assign the issue to the list of users selected in the assignment field. The following screenshot shows the complete trigger summary. EnterAssignEventTriggerSummary Next, update field security for the assignment field in all security groups. Users should have read/write privilege to the field when adding new issues, but the field should be hidden when editing issues to prevent users from using the field instead of a workflow event to assign updated items. Finally, make the assignment field required so users must select who to assign new issues to. If users do not set the field when adding issues, they are prompted to set it before saving. When all the changes are saved, add a new issue to test the required assignment field and trigger. Enter all the required issue information except the assignment setting and click Add. You should see a message indicating that you cannot save the issue because the assignment field is required. AddIssueAssignToRequired Select a user in the assignment field and then click Add again. The issue is added and automatically assigned to the selected user. When you view or edit the issue, you can see the Assign event was added to the issue and the initial assignment field is hidden. ViewIssueAssignTrigger

Solution 2: Create a trigger that prevents users from adding new items without assigning them first

This solution uses a trigger rule to make sure new issues are assigned through the workflow to the appropriate user before they are saved. First, create a trigger that applies only to issues that are not assigned. In the Add Trigger Rule dialog box, on the Precondition tab, click Create Filter. The filter should use the Currently Assigned To restriction to select issues that have an unknown assignment. AddFilterNotAssigned After selecting the precondition filter for the trigger, click the Trigger When tab to specify that the trigger should run when a new issue is created and before it is saved. Finally, click the Actions tab to add a prevent action that displays a message to users instructing them to enter the Assign event before saving new issues. The following screenshot shows the complete trigger summary. PreventAddingWithAssignmentTriggerSummary Next, make sure the initial state in the issue workflow allows users to add an Assign event. To check this, choose Tools > Administration > Workflow. Select Issues as the Type and click the Transitions tab. The initial state for new issues should have Assign set as an available transition. ConfigureWorkflowIntitalStateAssignTransition When all the changes are saved, add a new issue to test the trigger. Enter all the required issue information and then click Add. You should see the message indicating that you cannot save the issue because you did not enter an Assign event. AddIssueCannotSaveUnassignedIssueAssign the issue and then click Add again. The issue is added and assigned to the selected user. Thanks to Gordon Alexander, Seapine Software solutions specialist, for providing the second solution mentioned in this post.