Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

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

« Previous Version 23 Next »

NEW IN JMCF 2.0.0

A Time in status custom field type represents a duration and is displayed either as a duration String or as a number in a Long format representing the number of seconds. It is a read-only field.

Adding a Time in status custom field type

To add a Time in status custom field type to your instance:

  1. Log in to JIRA as an administrator.
  2. Go to the Administration icon  and click on it.
  3. Click on Issues - > Custom fields.
  4. Click on Add custom field.
  5. Click on Advanced in the left panel.
  6. Locate Time in status Field type and select it.
  7. Click on Next.
  8. Provide a name for the custom field
  9. You can optionally provide a description for the custom field.
  10. Click on Create
  11. Associate the custom field to the appropriate screens.
  12. Locate the custom field in the Custom fields administration page and click on the cog wheel.
  13. Click on Configure and specify the Status(es) to look for (explained below).
  14. You can create multiple contexts if you need to associate different statuses with particular projects or issue types.
  15. Perform a re-index as prompted by JIRA.

Search template

When creating a Time in status custom field type, you can configure the Search template as 

  • Duration searcher (24x7 durations) Allows searching for a duration. Durations are considered as calendar durations. Supports Statistics Gadgets.
  • Number range searcher - Allows searching for a number that is in a given range.

Using these searchers you will be able to search for issues within a range of values for that custom field. The default search template is Duration searcher (24x7 durations)If you select None, then you won’t see any reference to this field in the Issue Navigator search fields. Note that changing a custom field searcher requires a re-index

Duration searcher (24x7 durations) is a custom statistics compatible searcher provided by JMCF that allows Duration type custom fields of JMCF to be used in the statistics gadgets. See here for more information. 

Specifying the status(es) to look for

To specify the status(es) to look for:

  1. Locate the custom field on the Custom Fields administration page.
  2. Click on the cog wheel and click on Configure
  3. Click on Edit Status(es) to look for.
  4. Select the status(es).
  5. Click on Save.
You can also configure the custom field to look for the current status by selecting the current status in the configuration.

To remove the status(es) to look for:

  1. Locate the custom field on the Custom Fields administration page.
  2. Click on the cog wheel and click on Configure
  3. Click on Edit status(es) to look for.
  4. Uncheck the status(es) you wish to remove.
  5. Click on Save.

Customizing the formatting of the Time in status custom field value

For a Time in status field, the Search Template also determines how durations are displayed, and how duration strings returned by the formula are parsed. By default, the search template is Duration searcher (24x7 durations). However, you can customize it by changing the Search template. When you select the template,

  • Duration searcher (24x7 durations), the duration is displayed in general duration format, where a day has 24 hours. For example, 144000 seconds is displayed as 1day, 16hours.
  • Number of seconds, the duration is displayed as a number in a Long format representing the number of seconds.
  • None, the duration is displayed in general duration

Customizing the display of the Time in status custom field value

You can define a velocity template that will return the Html representation of the calculated custom field. Leave it empty to use the default template. 

To select a format for a Time in status custom field type value;

  1. Locate the custom field on the Custom Fields administration page.
  2. Click on the cog wheel and click on Configure
  3. Click on Edit Velocity Template.
  4. Input the template.
  5. Click on Save.

You can use the following Velocity variables in the template:

  • $value: the raw field value, the number of seconds
  • $formattedValue: the field value formatted according to the field configuration above
  • and other variables described on this page

For example:

<div style="border: dashed">
  $formattedValue
</div>

displays the formatted value of the field with a dashed border.

Displaying the Time in status custom field type on Transition and Edit screen

The Never show on Transition and Edit screens option controls whether the Time in status custom field can appear on transition and edit screens. If you select this option, the field will not be visible on any Edit or Transition screen, even if it is added to the screen.

Accessing the Time in Status custom field from other Groovy scripts

You can access this field using any of the following getters of the Issue interface

  • No labels