Bjarni is a senior web application developer and lead programmer for the Tempo Plugin.
Tempo is a JIRA plugin that eases time registration, reporting, and integration with external systems. Integration is very important for most companies, as JIRA does not provide an accounting system, something essential for billing customers and tracking expenditures like sick days and holidays. This article discusses how worklogs entered in JIRA can be integrated with an external system.
Integrating two systems is a fairly complex process; change in one system must be reflected in the other. Tempo, however, allows users to easily change worklogs, whether for something as simple as a spelling correction or the modification of a date, or for more involved tasks, such as deleting a worklog.
Tempo provides several services to integrate JIRA worklogs with external systems. The two main tools for worklog integration are:
These services are executed on the “other side,” i.e., the external system executes GetWorklogs to get the available worklogs and then calls UpdateWorklogs to sign for delivery, or to notify Tempo of the worklog status in the external system. GetWorklogs uses several parameters such as a date range and diffOnly which filters out worklogs that have changed since the last update. Additional parameters such as validOnly filter out worklogs that are known to give errors in the external system.
The most commonly used scenario is to let Tempo control the dates (open periods) and call GetWorklogs with the diffOnly, validOnly and of course format=xml options. Here is an example of how the URL to GetWorklogs is usually defined in the external (calling) system:http://yourserver.yourdomain/plugins/servlet/tempo-getWorklog/?format=xml&diffOnly=true&validOnly=true
The external system processes the worklogs and calls UpdateWorklogs for all logs processed. The external system must make sure that all processed worklogs are correctly updated. Failure to correctly update a worklog can result in the log being duplicated. It is at the discretion of the external system whether to update all the worklogs in one big update or to process them one at a time.
A detailed description of all the services can be found here. I will describe the other services and how they can be used later.
Update: You can read part 2 here: Integrating Tempo with your business solution