Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Search and Replace Updating Links from CAC to DAC
Section
Column

A service is a class that runs periodically within JIRA. Since a service runs inside JIRA, it has the ability to use all of the JIRA API — and, as it is written in Java, it can use any Java libraries.

Services are useful because they enable you to integrate with external systems by pulling data into JIRA periodically. JIRA comes with a number of pre-written services, and custom services can be written and plugged in at runtime. If you want a service to perform typical operations on JIRA issues (eg. close a list of issues meeting certain criteria), then the Jelly Service can be configured to run a custom Jelly script.

(tick) Writing a new service?

If you are not extending a built-in JIRA service, you should strongly consider writing your new service using the SAL API. Please see our Plugin Tutorial - Scheduling Events via SALfor more information.

Registering a Service

(info) For custom-written services, make sure your service class is in the classpath where JIRA can see it — the best locations are usually the <jira-application-dir>/WEB-INF/classes or <jira-application-dir>/WEB-INF/lib subdirectories within of your JIRA Installation Directory (as JAR files).

To set up a JIRA service:

  1. Log in as a user with the 'JIRA System Administrators' global permission.
  2. Select 'Administration' > 'System' > 'Advanced' > 'Services' (tab) to open the 'Services' page.
    (tick) Keyboard shortcut: 'g' + 'g' + type 'servi'
  3. In the 'Add Service' form at the bottom of the page, complete the following fields:
    • 'Name' — a descriptive name for this service.
    • 'Class' — the fully-qualified class name of your service. This is likely to have the form com.atlassian.jira.service.services.type.TypeService
      See Sample services for provided service class names.
      (info) To use one of JIRA's built-in service classes, first click the 'Built-in Services' link to expand the list of service classes and then click the name of the specific class in the list. The fully-qualified class name of the built-in service will be added to the 'Class' field.
    • 'Delay' — the delay (in minutes) between service runs.
      For example, to a POP Service, click the 'Built-in Services' link followed by the 'Create issues from POP' link:
  4. After completing the 'Add Service' form's fields, click the 'Add Service' button. This opens the 'Edit Service' page, where you can configure your new service's options.
  5. On the 'Edit Service' page, you may be required to specify a MessageHandler (i.e. 'Handler'), depending on the service you chose. A MessageHandler is a 'helper class' that processes email messages. MessageHandlers are configured with a parameter string, a comma-separated list of name/value pairs. Consult the tables below to determine the parameter(s) that each MessageHandler accepts. The following screenshot shows a CreateIssueHandler being attached to the example POP Service just created:
  6. After completing the remaining options on the 'Edit Service' page, click the 'Update' button to save your new service's options.
Column
width300px
Panel

On this page:

Table of Contents
maxLevel4

Include Page
_hostedNotApplicableNote
_hostedNotApplicableNote

...

You can design your own MessageHandlers to integrate JIRA with your own processes, and plug them into any of these three services via the Administration interface. (Please also see Adding your own email handling classes).

MessageHandlers are configured with a comma-separated list of name-value pairs, known as the handler parameters.

...