wiki:TestManagerPluginWorkflowOperations

TestManager plugin out-of-the-box Workflow Operations

The following operations are provided along with the TestManagerForTracPlugin:

Set resource owner

Syntax

set_owner

Parameters

The user will be asked who to assign the resource to, via a text box or a drop-down list, depending on the following setting. There are three options (the following examples assume a workflow is associated to Test Case resource):

  1. Let the user specify the new owner, without guidance and without any restriction. This is the default behavior.
  1. Let the user specify the new owner, but chosen among a fixed set of users, specified in the trac.ini file:
[testcase]
available_owners = user2,user3
  1. Let the user specify the new owner, but present a list of the known users that have the permission specified in the trac.ini file:
[testcase]
restrict_owner = true
restrict_owner_to_permission = WIKI_MODIFY

Requirements

The resourceworkflowstate class must have been added the custom property "owner". To do this, add the following to trac.ini:

[resourceworkflowstate-tm_custom]
owner = text
owner.value = 

Example

Adding a workflow to Test Cases, and specifying that when transitioning to the "singing" state, the sample_operation and the set_owner operations should be performed.

[testcase-resource_workflow]
sing = new -> singing
sing.permissions = TEST_MODIFY
sing.operations = sample_operation,set_owner

calmdown = singing -> calm
calmdown.permissions = TEST_MODIFY

[resourceworkflowstate-tm_custom]
owner = text
owner.value = 

Set resource owner to self

Syntax

set_owner_to_self

Parameters

None

Requirements

The resourceworkflowstate class must have been added the custom property "owner". To do this, add the following to trac.ini:

[resourceworkflowstate-tm_custom]
owner = text
owner.value = 

Example

Adding a workflow to Test Cases, and specifying that when transitioning to the "singing" state, the set_owner_to_self operation should be performed.

[testcase-resource_workflow]
sing = new -> singing
sing.permissions = TEST_MODIFY
sing.operations = set_owner_to_self

calmdown = singing -> calm
calmdown.permissions = TEST_MODIFY

[resourceworkflowstate-tm_custom]
owner = text
owner.value = 
Last modified 9 years ago Last modified on Jul 20, 2015, 10:22:55 AM