Child pages
  • How to Customize the Bugs Workflow
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

File structure

Workflow.xml file describes workflow actions (tag action). To simplify definitions of the actions it allows to define action conditions (tag condition).
To get know how to refer to field or enumeration value identifier user may copy query from Query Builder.

Conditions

"Sample condition"
<condition>
  <name>Open</name>
  <filter>status in (UNCONFIRMED NEW ASSIGNED REOPENED)</filter>
</condition>

Condition has two child tags (both are mandatory):

  • name defines a name of the condition to refer to it later
  • filter is a condition itself. The syntax is same as used in Query Builder. So to build the condition one can copy-paste it from Query Builder.

Actions

"Sample action"
<action>
  <name>Resolve As</name>
  <condition>Open</condition> <!-- <filter>status in (UNCONFIRMED NEW ASSIGNED REOPENED)</filter> -->
    <set>
      <!-- action script -->
    </set>
</action>

Mandatory action properties:

  • name The displayable name of the action. This text is used to show action on UI components (such as menus).
  • Action applicability. Applicability defines when the action can be performed against the bug. If the bug passes action applicability condition the action is applicable otherwise it is not. It can be defined by referring to defined Condition\ with condition tag or by specify special statement with filter tag. The content of filter tag has same syntax as conditions\.
  • set tag that defines the action script, what happens to the bug when action is applied. The script may define fixed changes or contain questions to user.

Optionally action may provide windowId child tag. The content of the tag defines identifier to store visual properties of action window. If not specified the action name is used to generate the identifier. This tag can be used to reuse one configuration for several actions.

Action script

"Sample modification"
<attribute>
  <name>status</name>
  <value>RESOLVED</value>
</attribute>

Action script defines zero or more modifications of a bug (action that defines no modifications has no sense but seems legal). Each modification defines what field of the bug is altered and how it should be altered.

value: Change field to predefined value

"Sample modification"
<value>RESOLVED</value>

This tag is now applicable only to enumeration fields (such as status or assignee). The content contains textual presentation of desire value. This modification is shown to user on action window but can not be modified.

askAddTextElement: Add text value

"Add comment"
<attribute>
  <name>comments</name>
  <askAddTextElement>$(bz.form.label.comment!mnemonic=o):</askAddTextElement>
  <checkbox>$(bz.form.label.privateComment!mnemonic=p)</checkbox>
</attribute>

Now this modification can be used only to add comment to a bug. It should be used as shown in the example.
Content of askAddTextElement defines label text. Content of checkbox defines text shown near to checkbox "private comment". Both can be replaced with any readable text.

askAddNotEmptyTextElement: Add not empty comment

This modification is same as askAddTextElement\ but enforces to provide comment. Action can not be finished until comment text is empty.

askReference: Choose single enumeration value

"Sample combobox"
<askReference>$(bz.field.Resolution!mnemonic=r):</askReference>
<exclude>N/A</exclude>
<exclude>DUPLICATE</exclude>

This modification allows to choose value for single enumeration field. Content of askReference allows to provide label text. On action form this modification is shown as combobox.
This modification supports additional exclude tags. Each of them allows removes one value from combobox variants.

askEditableReference: Choose or type in single enumeration value

This modification acts as askReference\ modification. The difference is that user may type in new value. exclude tags aren't supported for this modification.

askString: Change text field

"Sample change text field"
<askString>$(bz.field.DuplicateOf!mnemonic=d):</askString>

Allows to change value of text field when action is performed. In action window presented with text field.

  • No labels