Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated code samples

...

The formula should be included in the field description inside an html comment (so that it remains invisible when showing the field description), preceded by the following keyword: @@Formula: (note the colon at the end). For example:

Panelcode
<!-- @@Formula: formula goes here -->

You can naturally include the real description of the custom field as well. For example:

Panelcode

This field represents the number of Affected Versions.


<!-- @@Formula: issue.get("versions").size() --> 

The formula itself is a Java-style expression that can reference any issue field value, include arithmetic operators as well as any other Java operator, and Java method calls (such as the .size() example above). Access to issue field values is achieved by the following syntax:

Panelcode
issue.get("<field_ID>")

where <field_ID> is a built-in JIRA field ID (see this list) or a custom field ID (in the form customfield_nnnnn).

...

You can also specify custom formatting for the value of the Calculated Number field. In the Description field, add your formatting formula using the following syntax:

Panelcode
<!-- @@Format: formula goes here -->

The formula itself is a Java-style expression that can reference the value returned by the formula using the value variable. You can also use the numberTool object to format the number value:

...

To display an icon to the left of the field value depending on the field value:

Code Block
<!-- @@Format:

if (value > 21)
  return "<img src='/images/icons/priority_trivial.gif'> "+numberTool.format(value);
else if (value >= 10)
  return "<img src='/images/icons/priority_major.gif'> "+numberTool.format(value);
else
   return "<img src='/images/icons/priority_blocker.gif'> "+numberTool.format(value);
 -->

...

The transition should be indicated in the field description inside an html comment (so that it remains invisible when showing the field description), preceded by the following keyword: @TransitionId: or @TransitionName: (note the colon at the end). For example:

Panel
Span
stylefont-family:Courier
Code Block
 <!-- @TransitionId:
-
 transition ID --> 

or

Panel
Span
stylefont-family:Courier
Code Block
 <!-- @TransitionName:
-
 transition name --> 

You can naturally include the real description of the custom field as well. For example:

Panelcode

This field represents the date and time of the Resolution of this issue.


<!-- @TransitionId: 5 --> 

Anchor
transitioncallerfield
transitioncallerfield

...

The transition should be indicated in the field description inside an html comment (so that it remains invisible when showing the field description), preceded by the following keyword: @TransitionId: or @TransitionName: (note the colon at the end). For example:

Panel
Span
stylefont-family:Courier
Code Block
 <!-- @TransitionId:
-
 transition_ID --> 

or

Panel
Span
stylefont-family:Courier
Code Block
 <!-- @TransitionName:
-
 transition_name --> 

You can naturally include the real description of the custom field as well. For example:

Panelcode

This field represents the Resolver of this issue.


<!-- @TransitionId: 5 --> 

Anchor
parentstatusfield
parentstatusfield

...