Can I add to workflow automatic "Log Work" when transitioning in/out of "IN PROGRESS"?

Dan Peleg February 4, 2018

Can I add to workflow automatic "Log Work" when transitioning in/out of  "IN PROGRESS"?
I'd like to automate the work log time.

Thanks

1 answer

0 votes
Alexey Matveev
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.
February 4, 2018

You would need an add-on like Power Scripts or ScriptRunner. You could create your custom postfunction and log time from this post function.

If you have Power Scripts then your post function would look like this:

addWorklogAdjustEstimate(key, currentUser(), "2h", currentDate(), "test worklog");
Dan Peleg February 4, 2018

Thanks for the swift reply.
I assume there's nothing within the basic Jira.
Which scripting tool/add-on would you recommend?

Ivan Tovbin
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.
February 4, 2018

Like Alexey has pointed out it's either Power Scripts or ScriptRunner. I suppose JMWE will work too.

Alexey Matveev
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.
February 4, 2018

@Ivan Tovbinis right. I can just add that each add-on has it is own pros and cons. Moreover I used only Power Scripts and Scriptrunner. Power scripts has its own language and this language hides Jira architecture. You do not need to know anything about Jira to write a script in Power Scripts. But you can do in Power Scripts only what the language lets you do.

In ScriptRunner there are predefined functions but I mostly write my own scripts because it is easier for me. And you will have to know Jira Java Api and Jira architecture to write scripts in Scriptrunner. 

In my opinion scripts in Power Scripts are shorter, easier to understand and scripts in Power Scripts will work on any Jira verision. But Scriptrunner is more powerful.  It is up to you what to choose. As I said each of them has pros and cons. I would recommend you to try to write a script in both add-ons and choose.

Like Neal Slensker likes this
Dan Peleg February 4, 2018

Thanks  - I appreciate the help!

Suggest an answer

Log in or Sign up to answer