tags:

views:

18

answers:

1

My intention is to create a new field. Actually I need few fields:

  1. "AdditionalAnswer required" with values "yes" and "no";
  2. "Custom Level" with any text value from the list "1-cool", "2-middle", "3-low".

Type for both of them should be 'string'. I've exported work item type, and added the new field. Now the problem is that I don't see the most appropriate value type to be specified as the "RefName" for string type. For "Priority" field (that is really a string) special "System.Priority" RefName is used.

How can I create own value? This value should be filtered with "queries".

Any thoughts are welcome.

Thanks!

+2  A: 

The refname is the name of the field that you will reference in code (where "Name" is the displayed name of the field).

Here's how you would define the Additional Answer Required field:

<FIELD name="Additional Answer Required" refname="Custom.AdditionalAnswerRequired" type="String" reportable="dimension">
   <ALLOWEDVALUES expanditems="true">
      <LISTITEM value="yes"/>
      <LISTITEM value="no"/>
   </ALLOWEDVALUES>
</FIELD>

For refname, I've chosen "Custom" as a prefix, as it helps group together your custom fields. You can use pretty much any string here. I also set "reportable" to dimension. This will let you group / sum by these values in the cube, if you ever use it. Be careful with the "reportable" setting-- they can be difficult to change once you have data in the fields.

Robaticus
Excellent! Thanks a lot!
Budda