Bug Fields

Bug fields in DisTract are very simple and all independent of one another. The definitions are dynamically loaded and are defined in the bugs/fields/ directory within your DisTract bug database. The name of the field is the name of the file, and there are three different types of fields.

Freeform fields

Title is an example of this. It's just a textbox and you can enter text in it. Define it like so:

{"default":"",
 "type":"free"
}

Give a proper value to default if you really want a default value.

Simple Lists

Milestone is an example of this. Drop down select box that allows you to choose between a number of preset values. Define it like so:

{"default":"Milestone 1",
 "type":"simple",
 "values":["Milestone 1",
           "Milestone 2",
           "Milestone 3",
           "Milestone 4",
           "Milestone 5"
          ]
}

default must be provided and must equal one of the values. Case sensitive.

Graphs

Status is an example of this. You basically navigate through a graph of values. Define as so:

{"default":"New",
 "type":"graph",
 "values":{"New"       : {"Accept": "Accepted", "Mark as Duplicate": "Duplicated"},
           "Accepted"  : {"New":    "New",      "Resolve Fixed":     "Fixed"},
           "Duplicated": {"Reopen": "New"},
           "Fixed"     : {"Reopen": "New"}
          }
}

So, each value has an object which has verbs as keys and nouns as values. The nouns must be other values of the field. The options presented to the user in the bug are the verbs outgoing from the current value. Thus if the current value is Accepted then you'll be able to change the value to New and Fixed by choosing the verbs New or Resolve Fixed respectively.

 
fields.txt · Last modified: 2007/04/23 21:34 by matthew
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Debian Driven by DokuWiki