This new feature of Polarion 2.6.5 lets users to store important process information: the dates when work items change their workflow status. This information is always available in Polarion, but now we have the opportunity to easily use this data.
For example Polarion users can export status change dates to MS Word documents to highlight the evidence, important for quality processes, of the acceptance of work items (i.e. Requirement or Problem Report). Or we can export such information in MS Excel sheets and use it to audit/measure the time performances of some activities (i.e. how much time elapsed between creating a bug and fixing it).
How it works
The status change dates will be stored in specific custom field(s) of each individual item. So, first of all we have to define the custom fields where we would have dates stored.
For example, we are working on Defect item type and we would like to store the resolution dates.
Custom field definition:
Administration perspective: [select project] : Work Items > Custom Fields topic
Download the defect-custom-fields.xml file and add the following element:
Upload the modified configuration file back to Polarion. Then we can go on to define the workflow for the Defect item type
Using the Web Interface in the Administration Perspective choose topic Work Items/Workflow and create a new workflow definition specific for the Defect Work Item Type (click Create in the Actions column).
Find the Actions table and for action to resolve click on the icon in the last column on right side (labeled Actions).
Now we should have a new pop-up dialog like this one:
In the Function dropdown menu select the FieldValueChange option and click the plus icon and then the again.
Now we have the Parameters dialog where we have to specify following values:
So after closing the two dialogs and saving changes on the main workflow design page we should have the new workflow definition configuration file defect-workflow.xml
Here the fragment of the file with the new function defined:
<param name="field.name" value="resolutionDate"/>
<param name="field.value.type" value="current.date"/>
Now clear the system caches (Administration : Repository, Topic: System > Caches ) and go to try the result of your work!
Note that this new feature is a nice and generic function that we can find implemented out of the box; now, in Polarion 2.6.5, you can also design and implement your own custom functions that could be invoked during workflow transitions!
Custom code invocation in workflow transitions is a very advanced topic, and if you like, we will write some notes on that here on this blog!
In this part of the article we have seen how to record workflow status changes, in the second part we will show how to use these data. Stay tuned.