= [wiki:TestManagerForTracPlugin TestManager] plugin out-of-the-box Workflow Operations = [[BR]] The following operations are provided along with the plugin: * [wiki:TestManagerPluginWorkflowOperations#Setresourceowner Set the owner of the resource] to the desired user * [wiki:TestManagerPluginWorkflowOperations#2 Set the owner of the resource to the currently logged-in user] [[BR]] [[BR]] == Set resource owner == === Syntax === '''set_owner''' [[BR]] === 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: {{{ [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: {{{ [testcase] restrict_owner = true restrict_owner_to_permission = WIKI_MODIFY }}} [[BR]] === 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 = }}} [[BR]] === 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 = }}} [[BR]] [[BR]] == Set resource owner == === Syntax === '''set_owner_to_self''' [[BR]] === Parameters === None [[BR]] === 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 = }}} [[BR]] === 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 = }}} [[BR]] [[BR]]