Documentation



Configuration / Setup

Create additional customfield(s)

Create a new custom field of type "Status as Traffic-Light" with global context for all issues. Name it for example "Criticality". Then use the "configure"-operation to manually set the following three options. Click on edit options and leave it via "done"-button without having done anything and the default settings are used:
  • red
  • yellow
  • green
If you want a better ordering or use traffic-light together with my Gantt-Chart Addon for JIRA, please use the following constants as options:
  • 1-green
  • 2-yellow
  • 3-red
If you type them in, please use lower-case as shown above. Additionally, the following traffic-lights are available:
  • amber
  • pink

Dynamic Rules for automation and flexibility

You can define complex statements taking all issue methods into account, from current issue status until issue's parent object or status of children to determin, what traffic-light status to set. In opposite to other solutions, there exsist almost no reglementations: just program your rule in javascript syntax!
Available Listeners:
  • de.polscheit.jira.listener.DynamicRulesUpdateListener
  • de.polscheit.jira.listener.DynamicRulesCreationListener
  • de.polscheit.jira.listener.DynamicRulesWorkLoggingListener
Available workflow function:
  • Post function "Dynamic Rule(s) of Traffic-Light Status"
An expression is a set of javascript statements, each terminated by semicolon. All methods of the related issue can be accessed via issue.methodName(). Please have a look at Atlassian JIRA API for more detailed information about available methods, like issue.getKey() or issue.getStatusObject().getName(). Import: take care about the sequence/position of a workflow function! If a dynamic rule is executed as workflow function before storing the issue's new values, the former values are retrieved within the rule.
Additionally, the following utility functions are available:
  • log(Object obj);
  • setCFoption(MutableIssue issue, String customfieldName, String value);
  • getCF(MutableIssue issue, String customfieldName);
Samples:
  • util.log(func.getCF(issue,'Criticality'));
  • util.setCFoption(issue,'Criticality','yellow');
  • var criticality = util.getCF(issue, 'Criticality');if (criticality != null) util.log(criticality);
WARNING:
Exceptions are put into the JIRA log file. There is no syntex or semantic checking! So, be sure to enter the correct expression. I highly recommend to use a suitable test environment before modifying a productive system environment. In most cases, mal-functions are cause by humans.