I want that users can't assign an issue without entering the work log

Hello, I want that assigned user cant change issue status before entering work log.

For simply explanation, If my developer finished his development and want to change status, system should check if there is any work log entered. Is it possible?

2 answers

3 votes

Hi Batuhan - Alexey is correct - this cannot be accomplished with Jira by itself.

If you're running Jira Server or Data Center, you could accomplish this with an app like Power Scripts for Jira. Using the getWorklogLoggedHours routine, you could write a quick script and then apply it to your workflow transition as a validator.

interval checkUserWorklogs;
string errorMsg = "You must log work to advance this issue!";

for(number id in getWorklogIdsForUser(currentUser(), key)) {
checkUserWorklogs += getWorklogLoggedHours(id);
}

if(checkUserWorklogs!="") {
return true;
} else {
return false, "error", errorMsg;
}

Hi Batuhan,

There is a video created that walks you through exactly how to create a validator on work logs using Power Scripts .

Hope that helps!

0 vote
Alexey Matveev Community Champion Nov 08, 2017

Hello, 

You could attach a validator to the required transtion with a custom code which would check if the issue has worklogs. If you have Scriptrunner, I could give you an example.

I dont have Scriptrunner :( Is there any other way?

In Field Required Validator, there is no option for "Work Log".

Alexey Matveev Community Champion Nov 08, 2017

You can not do it in the out of the box Jira 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

589 views 6 12
Read article

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