Log work via scriptrunner for Ultimate Role Tracking and Estimation Plugin

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

1 answer

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in United States

Administrators Cleanup

Good morning, After a long weekend cleaning up, I am still in the cleanup mode 😊. I am curious to know: When do you feel the urgency to cleanup your Atlassian Tools? How many times do y...

44 views 1 1
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you