Time tracking in JIRA is a nice feature, but we have to get people to do it. My initial attempts to enforce time tracking ran into trouble, but I was able to develop a Jython Validator to hook on to transitions to the Resolved state. Now it is mandatory for our users to log time worked before they can resolve an issue:
# -*- coding: UTF-8 -*-import com.atlassian.jira.issue.worklog.Worklogfrom com.atlassian.jiraimport ComponentManager
# Time Already Logged
timespent = issue.getTimeSpent()# Time Logged via current screentry:
timelogged =dict(issue.getModifiedFields())['worklog']except:
timelogged =False# Duplicate Issue? It is as good as logged!
resolution = issue.getResolution()if resolution['name']=="Duplicate":
timelogged =Trueif resolution['name']=="Self Corrected":
timelogged =True# Nagios likes to close tickets, but doesn't get paiduser= ComponentManager.getInstance().getJiraAuthenticationContext().getUser()ifuser.getName()=="nagios":
timelogged =Trueif timespent <=0and timelogged ==False:
result =False
description ="Please log the time you spent on this ticket."
# -*- coding: UTF-8 -*-
import com.atlassian.jira.issue.worklog.Worklog
from com.atlassian.jira import ComponentManager
# Time Already Logged
timespent = issue.getTimeSpent()
# Time Logged via current screen
try:
timelogged = dict(issue.getModifiedFields())['worklog']
except:
timelogged = False
# Duplicate Issue? It is as good as logged!
resolution = issue.getResolution()
if resolution['name'] == "Duplicate":
timelogged = True
if resolution['name'] == "Self Corrected":
timelogged = True
# Nagios likes to close tickets, but doesn't get paid
user = ComponentManager.getInstance().getJiraAuthenticationContext().getUser()
if user.getName() == "nagios":
timelogged = True
if timespent < = 0 and timelogged == False:
result = False
description = "Please log the time you spent on this ticket."
2012-01-24 Update: the script now contains additional logic, which exempts the nagios user from enforcement and allows resolution of duplicated or self-correcting issues which may not require time tracking. Hopefully this example is useful to somebody.
Terminal windows resize themselves stupidly when changing font size. I don’t know how to fix that, but in the CompizConfig Settings Manager, I can enable Resize Info to overlay the dimensions of any window as I resize it.
Often, when dragging a window around, it tries to go full-screen on me. This is obnoxious! Just disable Grid in CCSM.
If anyone knows how to reconcile Focus Follows Mouse with “menu bar at the top of the screen” I would love to hear it! Or if you know how to configure the pager to something besides 2×2 …