Feature #1505
Default an issue's due date to the assigned version's due date [Includes Patch]
| Status: | New | Start: | 2008-06-19 | |
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Resolution: |
Description
I wasn't sure where to go with this one, as I've included a patch with a possible implementation, but it's more of a feature request as I'm not sure all aspects of this feature are desirable.
It seems to me that when an issue is assigned to a specific version and that version has a due date and that due date is out in the future at some point, the issue's due date should naturally default to when the specified version is due. Makes sense to me, at least.
I've attached two patches, one puts the functionality in the controller (less good), the other puts it in the Issue model's before_create callback (better).
Now, this could be more robust and check to see if the target version ever changes, and if it does apply the default. If that's the wish I could whip something like that up too - perhaps by utilizing the same sort of code found in Issue's before_save callback.
History
2008-06-19 22:52 - Jean-Philippe Lang
The problem with this default due date is that it won't be updated if you change the target version due date.
Note that, in current trunk, issues with no due date but with a target version automatically show up in the gantt chart with the same due date as the version (see r1455).
2008-06-19 23:07 - Brian Terlson
Ahh, very true, very true, and due dates do change frequently. r1455 does go a long way towards fixing the problem I was hoping to fix. Could this same logic be applied to the calendar so the tickets show up on the calendar when they are due? I could potentially make a patch for that behavior, although it may be that there is a compelling reason not to do that as well, such as too many items ending on the same day causing a fat calendar...
2008-06-20 05:03 - Eric Davis
I sometimes wonder if my private git repository is actually public.... :)
Earlier this month, I developed a plugin for a customer that will pretty much accomplish this (and more). It will set the issue's due date to the version's due date and will also update all of the related issues when a version's date is updated. It works 100% inside a plugin without requiring any modifications to the Redmine core.
I'll need to get authorization from my customer first but I shouldn't have any problems Open Sourcing it.
2008-06-20 05:23 - Brian Terlson
Yeah, I was just going to clone it locally but I figured eh, might as well fork. I might get into some heavier development at some point.
At any rate, glad to hear about the plugin! I think this is something that should be in core, though! For my usage, though, all I care about is that the calendar and the gantt chart display the issues as due at the time the version is due. If the actual due date field of the issue is null if it's not set, I'm fine by that ;)