Patch #1666
closed
explicitly mark versions as complete and restrict target versions
Added by Peter Van den Bosch over 16 years ago.
Updated about 15 years ago.
Description
Hi,
I made a patch which introduces two changes: it requires versions to be manually marked as completed and it disallows targeting open issues to completed versions.
It does this by adding a new column 'completed' to the db.
I think this patch has following advantages:
- The drop down list for target versions is smaller.
- Reopening a version by accidentally (or ignorantly) targeting an issue to a completed version cannot happen anymore.
- Versions don't disappear magically anymore. Some issues might still show up after the due date of a version has been reached.
- Usually, there are still a number of tasks to complete for a version to be considered completed which haven't been reported as issues like tagging on svn, publishing for download, etc.
This patch solves #262, #560 and some of the discussion on #1245 and on the forums too.
Btw, Jean-Philippe: thanks for all your hard work on redmine. It's really appreciated!
Files
I fully agree with the concept.
I'm going to try this patch in our environment to see how it goes.
I've been using the patch I supplied in #560 for 3 months now, and it has been fine except that it has been extended to include the current target of the issue that is being updated. This ensures that editing issues after a version is completed does not switch the target version to blank. For example, we may fix and issues and set it to a Documentation state which is closed. A version may then be complete and released; however, the document writers will do their work and edit the issue at some point after that. If only incomplete versions are shown then the target would become "blank".
I have attached the latest version of the patch we are using. It relies on implicit closing of versions based on all issues being closed, but I'd much rather use this patch with a explicit "completed" option.
One area this patch may also need to address is disallowing issues to be reopened in a completed version. This would require the re-opener to instead copy and issue to a new one (which makes sense I think).
Thanks for your feedback.
Nick Read wrote:
I've been using the patch I supplied in #560 for 3 months now, and it has been fine except that it has been extended to include the current target of the issue that is being updated. This ensures that editing issues after a version is completed does not switch the target version to blank. For example, we may fix and issues and set it to a Documentation state which is closed. A version may then be complete and released; however, the document writers will do their work and edit the issue at some point after that. If only incomplete versions are shown then the target would become "blank".
Yep this would be unexpected behavior, fixed this in new version of the patch.
Nick Read wrote:
One area this patch may also need to address is disallowing issues to be reopened in a completed version. This would require the re-opener to instead copy and issue to a new one (which makes sense I think).
The new patch allows reopening of an issue only if it is retargeted to an incomplete version. There was an obscure bug in the first version which caused it to be allowed. This still allows situations like when a bug was wrongly thought to be fixed in a version, has to be reopened and fixed in a later version.
Nick Read wrote:
I have attached the latest version of the patch we are using. It relies on implicit closing of versions based on all issues being closed, but I'd much rather use this patch with a explicit "completed" option.
Nick, thanks for the patch, I like it! It doesn't work for new issues however, so condition should be like
{|v| !v.completed? || @issue.fixed_version && v.id == @issue.fixed_version.id}
Nick, thanks for the patch, I like it! It doesn't work for new issues however, so condition should be like
{|v| !v.completed? || @issue.fixed_version && v.id == @issue.fixed_version.id}
I refactored Nick Read's patch, applied it to 2 more places (issues bulk edit and context menu), and created another one: #1676
- Status changed from New to Closed
Also available in: Atom
PDF