Jira Connector
Documentation
Version: 11
Documentation

Table Worklogs


Parameters

Parameter Label Required Options Description Help
There are no parameters

Supported Operations

Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.
Method Supported Reference EndPoint
SELECT get_worklogs
INSERT create_worklog
UPDATE update_worklog
UPSERT
DELETE delete_worklogs
LOOKUP get_worklogs

Examples

SSIS

Use Jira Connector in API Source component to read data or in API Destination component to read/write data:

Read from Worklogs table using API Source

Jira
Worklogs
SSIS API Source - Read from table or endpoint

Read/write to Worklogs table using API Destination

Jira
Worklogs
Select
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

List worklog entries for a specific issue by Id or Key

List all worklog entries for a specific issue

SELECT * FROM Worklogs Where IssueId=10003 --WITH(Key='10003')

List worklogs for issues (search by JQL)

List all worklogs (time entries) for issues returned from a JQL search expression (refer to previous example to learn about JQL - see Search issues using Advanced JQL query expression)

SELECT * FROM Worklogs WITH (Jql='status IN (Done, Closed) AND created > -5d' )

List worklogs

Lists all worklogs from all issues

SELECT * FROM Worklogs

INSERT Worklog

Inserts a single worklog to a particular issue

INSERT INTO Worklogs(TimeSpentInSeconds, Comment, StartedAt)
      VALUES(7200,'My Comment!','2020-02-23T16:20:30.123+0000')
      WITH (IssueIdOrKey='ISSKEY-1', OUTPUT=1)

UPDATE Worklog

Updates a worklog

UPDATE Worklogs
SET TimeSpentInSeconds = 28800
   ,Comment='My Comment!'
   ,StartedAt='2020-01-23T16:20:30.123+0000'
WITH (IssueIdOrKey='MTK-1', WorklogId='123465', OUTPUT=1, ContinueOn404Error=0)

DELETE Worklog

Deletes a single worklog of an issue

DELETE FROM Worklogs
WITH (IssueIdOrKey='10020', WorklogId='123465', OUTPUT=1, ContinueOn404Error=0)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

List worklog entries for a specific issue by Id or Key

List all worklog entries for a specific issue

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Worklogs Where IssueId=10003 --WITH(Key=''10003'')';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_JIRA_IN_DATA_GATEWAY];

List worklogs for issues (search by JQL)

List all worklogs (time entries) for issues returned from a JQL search expression (refer to previous example to learn about JQL - see Search issues using Advanced JQL query expression)

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Worklogs WITH (Jql=''status IN (Done, Closed) AND created > -5d'' )';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_JIRA_IN_DATA_GATEWAY];

List worklogs

Lists all worklogs from all issues

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Worklogs';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_JIRA_IN_DATA_GATEWAY];

INSERT Worklog

Inserts a single worklog to a particular issue

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Worklogs(TimeSpentInSeconds, Comment, StartedAt)
      VALUES(7200,''My Comment!'',''2020-02-23T16:20:30.123+0000'')
      WITH (IssueIdOrKey=''ISSKEY-1'', OUTPUT=1)';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_JIRA_IN_DATA_GATEWAY];

UPDATE Worklog

Updates a worklog

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Worklogs
SET TimeSpentInSeconds = 28800
   ,Comment=''My Comment!''
   ,StartedAt=''2020-01-23T16:20:30.123+0000''
WITH (IssueIdOrKey=''MTK-1'', WorklogId=''123465'', OUTPUT=1, ContinueOn404Error=0)';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_JIRA_IN_DATA_GATEWAY];

DELETE Worklog

Deletes a single worklog of an issue

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Worklogs
WITH (IssueIdOrKey=''10020'', WorklogId=''123465'', OUTPUT=1, ContinueOn404Error=0)';

EXEC (@MyQuery) AT [LINKED_SERVER_TO_JIRA_IN_DATA_GATEWAY];