= [wiki:TestManagerForTracPlugin TestManager] plugin out-of-the-box Workflow Operations The following operations are provided along with the TestManagerForTracPlugin: * [wiki:TestManagerPluginWorkflowOperations#Setresourceowner Set the owner of the resource] to the desired user * [wiki:TestManagerPluginWorkflowOperations#Setresourceownertoself Set the owner of the resource to the currently logged-in user] = 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. 2. Let the user specify the new owner, but chosen among a fixed set of users, specified in the `trac.ini` file: {{{#!ini [testcase] available_owners = user2,user3 }}} 3. 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: {{{#!ini [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`: {{{#!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. {{{#!ini [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: {{{#!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. {{{#!ini [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 = }}}