How can I prevent time logging under certain criteria in Jira?

Mark McD October 30, 2012

I've been asked to set up a state that will prevent users from logging work on specific issues in a project, despite the fact that they will have permission to log work on other issues.

The scenario is quite specific to our internal process, but it would be similar to a professional services company having a "Customer has been billed" status on an issue where any further hours cannot be logged. This is a contrived example so please forgive the flaws :)

Can I set it up such that an issue status prevents time logging? It seems something simple enough that an option may already exist, but I cannot find the right switch.

Thanks

2 answers

1 accepted

2 votes
Answer accepted
Alex Taylor
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.
October 30, 2012

Setting the property 'jira.permission.work.denied' to 'denied' for the workflow step(s) for which you want to prevent logging should do it.

We usually set this on the 'Verified' step so that no further work can be logged once the issue has been signed off by QA.

Mark McD October 31, 2012

That was easy, thank you!

Jorge Rivero March 4, 2014

Hi all.

Sorry to resurrect this but I want to keep a history of my issue alongside your solution.

I have changed the Closed Step Property to jira.permission.work.denied / denied and it seems to do the trick!

However, it looks like the Transition Screen (to Resolve/Close issue) is no longer accepting the log work input. So, the Log Work field appears, I enter time, but the time is not saved (no error takes place, not even in the Atlassian logs!)

Looking into the Transition Post Functions, I see this in the following order (and according to Atlassian, these can't be reordered)

Set issue status to the linked status of the destination workflow step.
— THEN
Add a comment to an issue if one is entered during a transition.
— THEN
Update change history for an issue and store the issue in the database.
— THEN
Re-index an issue to keep indexes in sync with the database.
— THEN
Fire a Issue Closed event that can be processed by the listeners

So, I see what the issue is (the first step in the transition is to set the status to Closed, so no further work can be logged against), but I can't find the workaround! Can you help?

Thanks,

Jorge

Mohammad Amin Sheikhzadegan February 25, 2017

also I have this problem and can not log work on transition screen after  changed the Closed Step Property to jira.permission.work.denied / denied

what is solution ?!

0 votes
Deniz Oğuz
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.
October 15, 2018

For people looking for a more general solution, you can achieve this by using "Worklog Verification" script feature of WorklogPRO. There are sample scripts in our repository but If you need a custom script, please let me know, we can write it together. 

Suggest an answer

Log in or Sign up to answer