July 18, 2011

Archiving List Values in TestTrack

Helix ALM
A common request is the ability to archive pop-up menu field values in TestTrack. You have a field with multiple values, and some of them are no longer applicable. You'd like to make them unavailable to users, but don't want to delete them because you still want to search based on those values and also don't want to lose historical data. In a previous post I mentioned that you can use Field Relationships to do this. In this post I'd like to show you how. If you recall from the previous post, the way field relationships work is that the values available in a pop-up menu field are controlled by the selection (or lack thereof) of a value in another field, the parent field. In this example, I'm going to create a new custom field that will be the parent. This custom field will control which values I want to archive. I'll create a field relationship between this field and the other fields that have values I want to archive. Then I'll hide the custom field for all groups except the administrator. For this example, I am going to archive a product name from the Product field. You can see the currently available choices in the following screenshot. [caption id="attachment_9079" align="aligncenter" width="288" caption="Current Products"]Current Products[/caption] To set this up, go to Tools > Administration > Custom Fields... and set up the custom field that will be the parent. In the following screenshot, you can see that I used a descriptive name (ArchiveListValues) and added one item to its list (you can't create a pop-up menu field without having at least one item in its list).   [caption id="attachment_9086" align="aligncenter" width="431" caption="Custom Field Configuration"]Custom Field Configuration[/caption]   Up next, I set up the field relationship. Make the custom field the parent field and the Product field the child field. In the following screenshot, I'm archiving "Product A". I set it so that, if a value is not selected in the custom field, "Product A" will not be available. Because I'm going to hide the custom field and it will default to "<not set>", "Product A" will no longer be available when adding or editing items. [caption id="attachment_9087" align="aligncenter" width="277" caption="Field Relationships"]Field Relationships[/caption] If the field that has values you need to archive already has a parent under field relationships, then you don't need to use the custom field. All you need to do is edit the field relationship and ensure the value is never available regardless of the option selected for the parent field. For example, I already have a relationship between the Product and Component fields, where Product is the parent field. If I need to archive one of the components, I'll just make sure the component is not selected for any Product field value. Also, next time you add a value to the child field, make sure you set the option so the field is associated with all values for the parent field. Otherwise the value will not show up until you manually edit the field relationship. The following screenshot highlights this setting. [caption id="attachment_9095" align="aligncenter" width="286" caption="Set Up New List Values"]Set Up New List Values[/caption] "Product A" is now no longer available when users go to add a new item or edit an existing item. [caption id="attachment_9098" align="aligncenter" width="321" caption="Add Defect Window"]Add Defect Window[/caption] If you do need to have "Product A" available for certain items, you will need to get a little creative. One way is to set it so "Product A" is available when the "<Do Not Use>" value is selected on the custom field. Then, using a trigger or Bulk Field Changes, set the custom field to this value for those items that should have "Product A" available.