| Name | JIRA Overdue Customfield |
|---|---|
| Version | 0.4 |
| Product Versions | JIRA 3.7+ |
| Author(s) | Philip Herbst |
| Homepage | Overdue Customfield |
| Price | FREE! |
| License | |
| JavaDocs | |
| IssueTracking | |
| Download JAR | overduefield-0.1.jar overduefield-0.4.jar overduefield-0.5-bleeding-edge.jar |
| Download Source | source-0.4.zip |
Description/Features
This is a Customfield that highlights overdue Issues in the Issue Navigator and displays the count of days the Issue is overdue. Issues overdue by less than 1 week are highlighted with red text.Issues overdue by 1 week or more are highlighted with bold red text.

Installation
Note: These instructions were not written by the plug-in author but by a novice Jira user; so they're more elementary than an experienced Jira user might write.
- Copy the jar into JIRA's WEB-INF/lib:
- overduefield-0.1.jar
- Restart JIRA
- Create a custom field of type OverDue Field
- Assign to desired issue types and projects, or leave defaults so it's usable on all.
- Don't associate field test to screens (not applicable).
- Browse to a project
- Open the Issue Navigator by clicking on a predefined query (e.g. Project Summary->In Progress)
- Click on Configure your Issue Navigator
- Select your new Overdue column from the Add New Column: drop-down list and click the Add button.
- Position your Overdue column where you want.
- Don't worry that your column description displays on the Configure screen; it won't show in the real Issue Navigator display.
- Done.
Note that you do not need to reindex your database for the values to show.
Usage
An overdue value will be displayed in the Issue Navigator for any issues that:
- are Unresolved and
- are past their Due Date. So they must have a Due Date value.
Configurable Duedate "Lag"
Jira stores the duedate without the datetime, that means that a Issue that has a duedate 31/Oct/06 is due the same day(starting at midnight).
There is now a parameter thats specifies the amount of hours which the duedate is "delayed".
Just change in atlassian-plugin.xml following line to fit your needs. In this example an issue with the duedate 31/Oct/06 is marked as due from 1/Nov/06 on
<param name="hoursToAddToDuedate" value="24"/>
Examples
Todo
Version History
| Version | Author | Notes |
|---|---|---|
| 0.1 | Philip Herbst | Initial release |
| 0.2 |
sae | Estimation field release |
| 0.4 | Philip Herbst | configurable Duedate "lag", jumped versions |
| 0.5 | Daniel Sand | .jar build form the latest source.zip |
Screenshots
|
Screenshots (view as slideshow) |
||||
|---|---|---|---|---|
|
|
|
|||
Source
public class OverdueField extends CalculatedCFType implements SortableCustomField { private static final Category log = Category.getInstance(OverdueField.class); private final long HOUR = 1000 * 60 * 60; private final long DAY = 24 * HOUR; public String getStringFromSingularObject(Object arg0) { return null; } public Object getSingularObjectFromString(String arg0) throws FieldValidationException { return null; } private Boolean getRoundParam() { return new Boolean((String) getDescriptor().getParams().get("round")); } private int getHoursToAddToDuedateParam() { String hoursToAddToDuedateParam = (String) getDescriptor().getParams().get("hoursToAddToDuedate"); int hoursToAddToDuedate = 0; try { if (hoursToAddToDuedateParam != null) hoursToAddToDuedate = Integer.parseInt(hoursToAddToDuedateParam); } catch (NumberFormatException e) { log.error("Invalid hoursToAddToDuedate Param"); return 0; } return hoursToAddToDuedate; } public Object getValueFromIssue(CustomField field, Issue issue) { long nowMillis = System.currentTimeMillis(); long millis = 0L; Number duedateDiff = null; Timestamp nowTimestamp = new Timestamp(nowMillis); Timestamp duedate = issue.getDueDate(); try { if (duedate != null && issue.getResolutionObject() == null) millis = nowTimestamp.getTime() - (duedate.getTime() + getHoursToAddToDuedateParam() * HOUR); else millis = Integer.MIN_VALUE; if (getRoundParam().booleanValue() && (millis > 1 * DAY)) millis -= millis % (1 * DAY); duedateDiff = new Long(millis / 1000L); } catch (Exception e) { log.error(e); } return duedateDiff; } }
Velocity template
This could be easily customized, e.g. color
#if ($value) #if ($value.intValue() > 0 && !$issue.resolution) $!dateutils.formatDurationPretty($value.intValue()) #end #if ($issue) #if (!$issue.resolution && $value.intValue() > 0) <style> <!-- #issuerow${issue.id} * { color: #cc0000; } --> </style> #end #if (!$issue.resolution && $value.intValue() > (86400 * 7)) <style> <!-- #issuerow${issue.id} * { font-weight: bold; } --> </style> #end #end #end

Comments (45)
Mar 29, 2006
Kevin James says:
Hmmm, installed this plugin and was able to add a custom Overdue field. Ad...Hmmm, installed this plugin and was able to add a custom Overdue field. Added this to my column to my navigator, but that Overdue column remains blank. I did reindex and had a list of issues with due dates in the navigator.
Is there something else I need to configure?
Jul 13, 2006
Ian Renshaw says:
You need to add the field "Due Date" as type "Date Picker" for this plugin to wo...You need to add the field "Due Date" as type "Date Picker" for this plugin to work.
Mar 29, 2006
Philip Herbst says:
Note that the field just diplays something if # no resolution is set # now > due...Note that the field just diplays something if
I dont think you need to reindex because the field is _calculated_ and not indexed. Will test soon with the latest version if theres a bug
Aug 27, 2006
Dawn Hunter says:
How can you "add the field "Due Date" as type "Date Picker" for this plugin to w...How can you "add the field "Due Date" as type "Date Picker" for this plugin to work," if the Due Date field already exists (as it does in all systems)? Must I add ANOTHER Due Date field?
Also -- I could have sworn there was a special mention here of how to make this work with 3.6.2. Has that been updated or removed? I only get the blank Navigator column, and I'm unsure how to change an already populated field (Due Date) to Date Picker (shouldn't it already be?).
Please advise - this would be a nice customization.
Thanks! - Dawn
Aug 27, 2006
Philip Herbst says:
Hi, you just have to add the customfield, you dont have to configure anything be...Hi,
you just have to add the customfield, you dont have to configure anything beside that. The field is calculated, so it has no own values. Basically it calculates the difference between NOW and the DUEDATE. When the duedate is in the future the field keeps blank in the issue navigator. It just diplays something when
I have tested the plugin with JIRA 3.6.3 and so it should work for 3.6.2 without any modification.
You could customize the plugin so that it displays something in the other cases(e.g. when the duedate is in the future). Feel free to post your ideas!
Cheers,
Phil
Aug 30, 2006
sae says:
I change this plugin to work with estimation time field. ("estimation time" fiel...I change this plugin to work with estimation time field. ("estimation time" field is jira default one).
http://confluence.atlassian.com/download/attachments/162670/overduefield-0.2.jar
Oct 25, 2006
Natasa Bulatovic says:
Hi, The estimation time field in my understanding = how much of total work needs...Hi,
The estimation time field in my understanding = how much of total work needs to be done for an issue
JIRA updates remaining estimate automatically after work-log is created and populated properly.
Here is the situation (example):
DueDate of issue = 19.Feb.07
Remaining estimate = 1 min
Timespent= 1 week, 3 days, 5 hours
Overdue = 5 days, 1 hour, 35 minutes
it is probably wrong to mix overdue (which is related to date) and workload (more/less work actually performed) into one overdue field. These are substantially different infomation.
Sep 12, 2006
stefano ciccarelli says:
Hi, I was wondering if this plugin works with subtasks, too. Thank you, StefanoHi,
I was wondering if this plugin works with subtasks, too.
Thank you,
Stefano
Sep 12, 2006
Philip Herbst says:
Hi, Yes, it works. It doesnt care about the Issue Type and if its a subtask. Che...Hi,
Yes, it works. It doesnt care about the Issue Type and if its a subtask.
Cheers,
Phil
Sep 26, 2006
Dharmendra Varma says:
Hello Philip, This was great plugin and appreciate your efforts. I a...Hello Philip,
This was great plugin and appreciate your efforts. I am facing an issue with this plugin. I dont see all the issues which are overdue in red color. I see few in red and other in black only. Can you guide me as to what may be the reason for it?
Dharmendra
Sep 13, 2006
James Anderson says:
The plugin marks things as overdue when they are due that day. Like if i e...The plugin marks things as overdue when they are due that day.
Like if i enter a task, mark it as due sept. 18th, the plugin will mark the task as overdue on sept 18th instead of the next day when it is actually overdue.
So if you enter a task thats due the same day, it is overdue immediately.
Cheers,
James
Sep 26, 2006
Neal Applebaum says:
James I see your point. To be fair, my customization (seeJames - I see your point. To be fair, my customization (see http://jira.atlassian.com/browse/JRA-9749) assumes the same thing - that it is due at 12:01 AM that day, not close of business, or 11:59 PM. If it is due today, it is displayed in RED.
Sep 26, 2006
Philip Herbst says:
Hi, you can change the behaviour of the plugin by simply adjusting the velocity...Hi,
you can change the behaviour of the plugin by simply adjusting the velocity template col-overduefield.vm .
This calculated field holds the seconds which the issue is overdue starting at 12 AM that day, as Neal pointed out. This is due to the fact that the due date timestamp only holds a date but not day time.
Edit following line
#if (!$issue.resolution && $value.intValue() > 0) <style> <!-- #issuerow${issue.id} * { color: #cc0000; } --> </style>to
#if (!$issue.resolution && $value.intValue() > 60*60*12)The issue is now overdue 12 hours later.
Hope that helps
Oct 31, 2006
Bettina Zucker says:
Hello Phil, I got the same critique by my users: for them, if it is due today an...Hello Phil,
I got the same critique by my users: for them, if it is due today and not yet done, it is still not overdue.
My problem is that my Jira(3.6.2)+Overdue-Plugin does not start counting the overdue hours at noon.
It starts from the midnight before the due day! So I must admit my users are in any case right.
With your tip I managed to make the issues colored in red later, but the value appearing in overdue is still counted from 00:00:00 of the due day. This is not accepted by my users!
I suppose the only good solution is to correct the java code. Do you have any hints?
Cheers
Bettina
Oct 31, 2006
Neal Applebaum says:
I think Phil already answered that. His example was for noon by changing #if (...I think Phil already answered that. His example was for noon by changing
to
So all you would do is make it like this:
for midnight or
for 5pm.
Oct 31, 2006
Philip Herbst says:
Hi Bettina, I see your point. I worked a little on the plugin and introduced a ...Hi Bettina,
I see your point. I worked a little on the plugin and introduced a Parameter that allows you to "add" a certain amount of hours to the duedate.
In atlassian-plugin.xml you can adjust the following value (24 Hours are now default)
This means that an Issue with a duedate 31/Oct/06 is marked as due from 1/Nov/06 on.
I also addressed the sorting issue. I read your comment regarding sorting and searching. I dont think you need to index the value because can already can search for overdue issues out of the box(better because you dont need to reindex to use the plugin). I just added a dummy value for issues with no duedate or a resolution -> Integer.MIN_VALUE. This ensures that they are a the bottom respectively at the top of the list. Issues which are overdue in the future have a negative value, so sorting should work properly. Those values (less than 0) are not shown in the UI
Hope this helps,
phil
Oct 31, 2006
Philip Herbst says:
Download overduefield0.4.jarDownload overduefield-0.4.jar
Oct 31, 2006
Philip Herbst says:
Ok, its getting late sorry for my typos ;) To clarify: with the default param ...Ok, its getting late sorry for my typos
To clarify: with the default param
an issue with a duedate 31/Oct/06 is marked as due from 1/Nov/06 12 AM, because the duedate is stored without daytime (stored as 31/Oct/06 12 AM)
Oct 26, 2006
Bettina Zucker says:
Hi Phil, I've added ordering to your plugin, so that you can order the navigator...Hi Phil,
I've added ordering to your plugin, so that you can order the navigator column "Overdue" by time past.
Since it is very simple to make this change, I'll want to share it here.
You just have to use a Double for the variable duedateDiff instead of a Long.
Then you can use the jira standard Number Range Searcher to index the field.
You can even search by using this searcher.
For instance you can search all overdue by just putting 1 second into the first field of the search.
In general it is difficult to search because you need the number of seconds.
Cheers
Bettina Zucker
P.S.:
Since I changed a little bit more than just the Long -> Double, I'll put here my code,
where (...) stands for whatever your organisation name is:
package (...).jira.plugin.overduefields; import com.atlassian.jira.issue.Issue; import com.atlassian.jira.issue.customfields.SortableCustomField; import com.atlassian.jira.issue.customfields.impl.CalculatedCFType; import com.atlassian.jira.issue.customfields.impl.FieldValidationException; import com.atlassian.jira.issue.fields.CustomField; import org.apache.log4j.Category; import java.sql.Timestamp; import java.util.*; public class OverdueField extends CalculatedCFType implements SortableCustomField{ private static final Category log = Category.getInstance(OverdueField.class); public String getStringFromSingularObject(Object singularObject) { assertObjectImplementsType(Double.class, singularObject); log.info("getStringFromSingularObject: singularObject = " + singularObject); log.info("getStringFromSingularObject: string = " + singularObject.toString()); return singularObject.toString(); } public Object getSingularObjectFromString(String string) throws FieldValidationException { if (string==null || string.equals("")) return null; log.info("getSingularObjectFromString: string = " + string); return new Double(string); } public Object getValueFromIssue(CustomField field, Issue issue) { long nowMillis = System.currentTimeMillis(); long millis = 0L; Number duedateDiff = null; Timestamp nowTimestamp = new Timestamp(nowMillis); Timestamp duedate = issue.getDueDate(); try { if (duedate!=null && issue.getResolutionObject()==null) millis = nowTimestamp.getTime() - duedate.getTime(); else millis = 0L; if (millis>86400000) millis -= millis % 86400000; duedateDiff = new Double(millis / 1000L); } catch (Exception e) { log.error(e); } return duedateDiff; } }And here is the atlassian-plugin.xml:
Nov 12, 2006
Colin Goudie says:
Can anyone give me any pointers as to why I'm not seeing the overdue rows show u...Can anyone give me any pointers as to why I'm not seeing the overdue rows show up as red? I can see the date due column and can see that the entry is in the past but the entry does not show up red.
Thanks
Nov 13, 2006
Neal Applebaum says:
Colin, maybe it has to do with your date format(s)?Colin, maybe it has to do with your date format(s)?
Nov 13, 2006
Philip Herbst says:
Hi Have you added the customfield to your issue navigator? Like the last ...Hi
Have you added the customfield to your issue navigator? Like the last column in the screenshot
Nov 13, 2006
Colin Goudie says:
Thanks Philip, Silly me didn't add the Overdue column.Thanks Philip,
Silly me didn't add the Overdue column.
Nov 29, 2006
Jan Deichsel says:
Hello\! Is it possible to automatically set preset a date to the Due Date field,...Hello!
Is it possible to automatically set pre-set a date to the Due Date field, depending on the priority? That would help our business case very much.
Thanks a lot in advance!
Mar 11, 2007
Markus Khouri says:
A project manager I am working with wanted this functionality, i.e. amount of ti...A project manager I am working with wanted this functionality, i.e. amount of time overdue, but also wanted the "underdue amount of time". The term under due meant that he wanted to know in how many days an issue would be due. To meet this requirement, I modified "\WEB-INF\classes\templates\col-overduefield.vm" as follows:
The problem is, now a bug has appeared, as can be seen in the following screenshot where there is a gap is the sorting which contains the issues which do not have a due date. My expectation was that issues which do not have a due date would be at the bottom of the ordered list:

It just so happens that "-2147483" is the number that is returned when there is no due date, which is about 24.9 days, or between 3 weeks 3 day and 3 weeks 4 days. Note also that Integer.MIN_VALUE = -2,147,483,648, which, when divided by 1000 as is done in OverdueField.getValueFromIssue(), results in -2147483.
So.... I am thinking that a potential cause/solution is that instead of setting the value to Integer.MIN_VALUE, it should be set to Long.MIN_VALUE.
Now, I am not 100% sure if this would do the trick.... if the source code were provided, it would be helpful. Please note I am using version "overduefield-0.4.jar" of this extension.
Mar 12, 2007
Philip Herbst says:
Hi, I've attached the source source.zip of the plugin with some modifications t...Hi,
I've attached the source of the plugin with some modifications that should work for you. 2 things to mention:
1. I've introduced the negative value in order change the sorting behaviour (you can change the return value to null but that will have an impact on the sort order)
2. The version of velocity Jira comes with has no support for long comparisons
I've changed the return value for no-duedate issues from Integer.MIN_VALUE/1000 to Integer.MIN_VALUE which was actually a bug.
Feel free to modify the code. Hope that helps,
Philip
Mar 13, 2007
Markus Khouri says:
Thank you. I will figure out how to compile the code and test it out. ...Thank you. I will figure out how to compile the code and test it out. Once again, thanks.
-markus
Mar 28, 2007
Efi Bagourdi says:
Does anybody know if this plugin is compatible with jira 3.8?Does anybody know if this plugin is compatible with jira 3.8?
Mar 28, 2007
Philip Herbst says:
Hi, tested it with 3.8 and it works. Cheers, PhilHi,
tested it with 3.8 and it works.
Cheers,
Phil
Apr 15, 2007
Mohammed Haque says:
Hi Phil, The plugin doens't work for on JIRA 3.8. I downloaded the ver 0.4...Hi Phil,
The plugin doens't work for on JIRA 3.8. I downloaded the ver 0.4 and did everything as instructed here. I created the new field of type "OverDue" and then also configured the issue navigator as well. I do not see the overdue calcualtion and no high-lighting either. Please let me know if I am missing anything.
Thanks,
Mohammed
Oct 18, 2007
Daniel Sand says:
Ola, just builded a 0.5 .jar. overduefield0.5bleedingedge.jar tested under JI...Ola,
just builded a 0.5 .jar.
overduefield-0.5-bleeding-edge.jar
tested under JIRA 3.7.4
so long
Daniel
P.S.: thx Markus for the help :]
Oct 31, 2007
gareth Collins says:
Hey, I have installed this plugin and it is great i can see all the calls ...Hey,
I have installed this plug-in and it is great i can see all the calls are in a nice blue and all the overdue calls are red, i was wondering if there is a tweak that i can make to flag up tasks that are due that day (eg 0 minutes) to being a different colour. Im using this software as a helpdesk and this would really aid me in being able to see what calls are due that day instead of looking down the due date field and seeing that way as im bound to miss something and have users moaning at me (like thats ever going to stop)
Thanks in advance
Gareth Collins
Dec 13, 2007
Paul Csapo says:
Hello Phil, does this plugin work in Jira 3.12? We tried to install it but canno...Hello Phil, does this plugin work in Jira 3.12?
We tried to install it but cannot see any Custom Field types called "OverDue".
regards,
Paul