Creating Worklogs with Attributes and Accounts Using REST API and

We haven’t implemented a REST API for WorklogPRO Cloud yet. Underlying Forge platform doesn’t allow us to implement our own REST API. As a work around you can do this using Jira’s own REST API. First create the worklog using Jira’s REST API and store the account/attributes on the just created worklog using the worklog properties REST API.

1- Record worklog using Jira’s rest Api as explained here.

2- Store the worklog attributes as issue properties using the rest Api as explained here.

 Here is an example. Not that accountId and worklog attribute IDs will change in your system. You can inspect them when using the “Log Work” dialog and Network tab of the browser. Our own “Log Work” dialog also uses these apis.

 

POST /rest/api/3/issue/10538/worklog

{ "comment": { "type": "doc", "version": 1, "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "test work description" } ] } ] }, "started": "2024-04-30T15:07:02.000+0300", "timeSpent": "2h" }

PUT /api/3/issue/10538/worklog/10925/properties/worklogpro. Please note that 10538 is issue id and 10925 is worklog id (create by above call) that will change for you.

{ "version": 2, "account": "1232-fe12-3122-3d46-434223ab32", "attributes": { "0bfe8f0b-fea9-47ef-9892-48fb151472d8": "69d2bebb-9f07-4c1f-a3fb-70466b5228a6", "d5be7abe-ba8b-4923-acd0-1e9470ab2f19": "INV-0000", "dd913270-c1ec-4022-a176-34c3908e5221": 7200, "e67681e9-8671-455e-b837-1203923b2aed": "8424a51b-ebff-4726-8631-c1e205d9ec79" } }