Child pages
  • How to Customize the Bugs Workflow

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To define actions a set of tags is used. See below for the detailed explanation.

Actions

The action element tag is used to define the action and its preconditions.

...

  • The name tag, which defines the name of the action shown in the UI components (such as Workflow drop-down listcombo box).
  • Action applicability condition, which defines which conditions an issue must meet to be eligible for the action. Action applicability can be defined either by referring to the condition defined earlier or by specifying a filter statement using the filter tag and the same syntax as is used for the condition definition.
  • The set tag, which defines the action script run which runs when the action is applied. The script may contain both defined actions (for example, change the status value to Closed for the Close action) and actions, which require user input (for example, get the user comment when the issue status is changed).

...

Below is the explanation of the Action action script syntax.

Conditions

Anchor
conditions
conditions

Issues must meet specific conditions to be eligible for the action. These conditions are defined outside the action tags using the condition tag and then used in the action element.

...

  • The name tag defines the name of the condition by which it can be referred to later.
  • The filter tag defines the condition itself. The syntax is same as in the Query Builder so the condition can be created in the Query Builder and then copied to the XML.
Tip

The Workflow.xml file uses the same syntax as the Query Builder for conditions definition, so the statements can be created in the Query Builder and then copied to the XML file.

Action

...

Script

Action script is provided in the set tags and defines a number of changes that are made to the issue as a result of the action (the action that defines no changes does not make sense, but is valid). Each script element defines which field of the issue is altered and how.

Below is the description of tags used to define the fields changechanges.

value

The value tag assigns the specified value to the field defined in the name tag.

...

When the action is selected from the Workflow combo box the modified field is shown to user in the Action window with its new value and in the Action window in the read-only mode.

askAddTextElement

Anchor
askAddTextElement
askAddTextElement

The tag adds a text value and is shown  shown as the text box in the Action window.

...

This tag can only be used to add comments to an issue and should be used as shown in the example.
Content of askAddTextElement defines the text box label text. Content of checkbox defines the text label shown next to the "private comment" checkbox, which defines if the comment is visible to other users. Content of both tags can be filled with any text.

askAddNotEmptyTextElement

This tag is the same as askAddTextElement, but makes the comment mandatory. The action cannot be completed unless the comment is specified.

...

This tag works as the askReference tag, but allows user to type in new values and is shown as a standard combo box in the Action window where a user can either select an existing value or type in a new value. The exclude tags are not supported for this element.

...

This tag prompts a user to change the value of the text field when the action is performed by specifying a the new value in the text box.

...