Log work via scriptrunner for Ultimate Role Tracking and Estimation Plugin

chazt3n November 7, 2016

How do I use this plugin and log work programatically via the script runner?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Abhinav Ojha
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2016

Hi,

We have REST services for the Log Work (by Roles) information. You can call POST service as mentioned below, and feed it the data as the format I give, which will log/update work for you on the roles of your choice.

You can read here, how to make REST calls from script runner : https://answers.atlassian.com/questions/314819

The PUT service is : {context path}/rest/adweb/2/logworkCF/worklogImport

The data you feed will be like the following :

{
 "worklogroles": [
 	{
 		"issueKey": "JT-2",
 		"roleId": 10000,
 		"worklogId": 0,
 		"worklogAuthor": "admin",
 		"timeSpent": 21600,
 		"startDate": "Wed Mar 30 18:07:00 IST 2016",
 		"worklogDesc": ""
 	},
 	{
 		"issueKey": "JT-3",
 		"roleId": 10001,
 		"worklogId": 0,
 		"worklogAuthor": "admin",
 		"timeSpent": 120,
 		"startDate": "Wed Mar 30 18:08:00 IST 2016",
 		"worklogDesc": ""
 	}
 ]
}


Here you can see, you can have as many number of worklogs you want.

Here you should note that "worklogId" is 0, which will create a new worklog, but if you want to update an existing logwork, you can provide a logwork id there.

The time spent is in seconds.

The startDate format should be in the format : "EEE MMM dd hh:mm:ss zzz yyyy".

I hope this should help you.

Please let us know if you face any trouble in this or if you have any further queries.

 

Thanks,

Abhinav.

TAGS
AUG Leaders

Atlassian Community Events