Feature #1505
closedDefault an issue's due date to the assigned version's due date [Includes Patch]
0%
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.
Files
Related issues
Updated by Jean-Philippe Lang over 16 years ago
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).
Updated by Brian Terlson over 16 years ago
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...
Updated by Eric Davis over 16 years ago
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.
Updated by Brian Terlson over 16 years ago
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 ;)
Updated by Eric Davis over 15 years ago
- Assignee set to Eric Davis
Let me follow up on this and see if I can release it.
Updated by Shane Pearlman over 15 years ago
Eric - go ahead and open source it, I don't think Peter will object to me just giving you the ok.
Updated by Eric Davis over 15 years ago
- Status changed from New to Closed
- Resolution set to Wont fix
I've just spent most of the day today cleaning up and testing the redmine_issue_due_date
plugin. It's now ready for general use and is documented on the wiki at PluginIssueDueDate.
Updated by Ingolf Steinhardt almost 15 years ago
Hi Eric,
it´s possible to add a second date like "target date" - this mean the date from planning schedule and the due date as the date at the issue is ready
if the due date <= target date: good :-)
if due date > target date: bad :-(
if due date >> target date: the deathsman is comming!
the compare can commbined with a alert system e.g. one day before due date == target date send Redmine a eMail...
query1