Changes between Version 2 and Version 3 of TestManagerPluginWorkflowOperations


Ignore:
Timestamp:
Nov 30, 2010 11:22:50 PM (4 years ago)
Author:
seccanj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TestManagerPluginWorkflowOperations

    v2 v3  
    22 
    33[[BR]] 
    4 TODO: To be described. 
     4The following operations are provided along with the plugin: 
     5 
     6 * Set the owner of the resource 
     7 * Set the owner of the resource to the currently logged-in user 
     8 
     9[[BR]] 
     10[[BR]] 
     11 
     12== Set resource owner == 
     13 
     14=== Syntax === 
     15  '''set_owner''' 
     16 
     17[[BR]] 
     18=== Parameters === 
     19The user will be asked who to assign the resource to, via a text box or a drop-down list, depending on the following setting. 
     20   
     21There are three options (the following examples assume a workflow is associated to Test Case resource): 
     22 
     23 1. Let the user specify the new owner, without guidance and without any restriction. This is the default behavior. 
     24 
     25 2. Let the user specify the new owner, but chosen among a fixed set of users, specified in the trac.ini file: 
     26 
     27{{{ 
     28[testcase] 
     29available_owners = user2,user3 
     30}}} 
     31 
     32 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: 
     33 
     34{{{ 
     35[testcase] 
     36restrict_owner = true 
     37restrict_owner_to_permission = WIKI_MODIFY 
     38}}} 
     39 
     40[[BR]] 
     41=== Requirements === 
     42The resourceworkflowstate class must have been added the custom property "owner". 
     43To do this, add the following to trac.ini: 
     44 
     45{{{ 
     46[resourceworkflowstate-tm_custom] 
     47owner = text 
     48owner.value =  
     49}}} 
     50 
     51[[BR]] 
     52=== Example === 
     53 
     54Adding 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. 
     55 
     56{{{ 
     57[testcase-resource_workflow] 
     58sing = new -> singing 
     59sing.permissions = TEST_MODIFY 
     60sing.operations = sample_operation,set_owner 
     61 
     62calmdown = singing -> calm 
     63calmdown.permissions = TEST_MODIFY 
     64 
     65[resourceworkflowstate-tm_custom] 
     66owner = text 
     67owner.value =  
     68}}} 
     69 
     70[[BR]] 
     71[[BR]] 
     72== Set resource owner == 
     73 
     74=== Syntax === 
     75  '''set_owner_to_self''' 
     76 
     77[[BR]] 
     78=== Parameters === 
     79None 
     80[[BR]] 
     81=== Requirements === 
     82The resourceworkflowstate class must have been added the custom property "owner". 
     83To do this, add the following to trac.ini: 
     84 
     85{{{ 
     86[resourceworkflowstate-tm_custom] 
     87owner = text 
     88owner.value =  
     89}}} 
     90[[BR]] 
     91=== Example === 
     92 
     93Adding a workflow to Test Cases, and specifying that when transitioning to the "singing" state, the set_owner_to_self operation should be performed. 
     94 
     95{{{ 
     96[testcase-resource_workflow] 
     97sing = new -> singing 
     98sing.permissions = TEST_MODIFY 
     99sing.operations = set_owner_to_self 
     100 
     101calmdown = singing -> calm 
     102calmdown.permissions = TEST_MODIFY 
     103 
     104[resourceworkflowstate-tm_custom] 
     105owner = text 
     106owner.value =  
     107}}} 
     108 
     109[[BR]] 
     110[[BR]]