How can I prevent logging work time on a closed JIRA issue?

Frank_Spafford March 25, 2015

How can I prevent, or at least give a warning about, logging work time on a closed JIRA issue?

4 answers

1 accepted

5 votes
Answer accepted
Philippe Aubin
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.
March 25, 2015

You can edit the status propriety "Closed".

(https://confluence.atlassian.com/display/JIRA/Workflow+properties)

Add the following propriety:  jira.permission.work    --> value: false

 

Sean Arcacha April 7, 2016

Best Simple Solution I have seen.  Great Help, Thanks!

Natalie White October 4, 2019

FYI, in case anyone in the future comes here looking for the property to do this with Tempo (like I did): 

jira.permission.work.denied ---> value: denied

Source: https://tempo-io.atlassian.net/wiki/spaces/KB/pages/362906172/Time+entry+approval+workflow

Like # people like this
Ye Fung Tchen November 10, 2020

@Natalie White thank you. That's almost what I've been looking for. Is it also possible to set a rule "If a user tries to log time on an closed issue after 2 weeks times it is not possible, but before that"?

1 vote
Tom Napper March 25, 2015

I tried the answer Philippe suggested and it didn't work in my Cloud instance. Get a crazy error.

I manage this differently. I have set user permissions on "Resolve Issues" to project managers only. Setting this permission restricts others from closing or reopening issues. This manages the time entry issue because a user can only edit Time on an issue if they reopen a closed issue. Restricting the Re-Open to only Project Mangers restricts users abilities to add time after the issue is closed. If you have a process were team members can close issues on their own this solution may not work for you.  

Philippe Aubin
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.
March 25, 2015

Oh sorry about that, didn't saw the cloud tag.

0 votes
Tom Napper April 12, 2015

Hi Brendan. 

Here is the premise I'm working with. Users can't edit their time against an issue that is closed. 

My approach is to restrict who can re-open a closed issue because the issue at hand is "How can I prevent logging work time on a closed JIRA issue?" In order for a user to add more time to a closed issue they need to first re-open an issue and then enter the time. I just restrict the ability to re-open tickets to Project Managers. 

This is done by going into your Permisssion Scheme and changing the "Resolve Issues" Project Permission to include only the people you want to be able to "resolve" or "reopen" and issue. 

This could be problematic if you have allowed everyone to resolve an issue. Just remember that "resolving" and closing are two different functions. So, I would say, change your Resolve Issue permissions and see if that fixes your issue. It sounds like you are not using "resolve" in your workflow so it is going to be OK.  

Brendan Andrews April 12, 2015

Thanks for responding so quickly Tom. The problem I am seeing is that the people can log time against an issue *while it's closed*. It is for a custom workflow another admin created with just two states (open and closed) - I think this might be the root of the problem: It doesn't happen on the default workflows I have.

Brendan Andrews April 12, 2015

Found it - the closed status didn't have the 'jira.issue.editable' property, I've now added it and set it to false.

Maryam LeFavi September 11, 2017

how do you add a property to a status? im on the cloud version of jira 1.0.3-AC and tempo 1.1.47-AC

Brendan Andrews September 12, 2017

You can find this here - it's an attribute of the status edited in the workflow.

 

https://confluence.atlassian.com/jirakb/how-do-i-edit-closed-issues-779160787.html

0 votes
Brendan Andrews April 12, 2015

I'm using JIRA Cloud too and don't have a solution to this yet. I don't follow Tom's solution - is he saying that restricting who can close an issue will stop work being logged when closed?

 

We have just two statuses - open and closed. How do I stop work being logged when an issue is closed?

Suggest an answer

Log in or Sign up to answer