Patch #1666

explicitly mark versions as complete and restrict target versions

Added by Peter Van den Bosch 83 days ago.

Status:New Start:2008-07-20
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:Projects
Target version:-

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!

explicit_version_completion.patch (9.6 KB) Peter Van den Bosch, 2008-07-21 00:50

only_show_incomplete_target_versions.patch (2 KB) Nick Read, 2008-07-21 03:37

explicit_version_completion_v2.patch - fix validation bug + always show current target version (12.2 KB) Peter Van den Bosch, 2008-07-21 18:18


Related issues

related to Patch #262 Restrict fixed versions selector listboxes to versions that are still open New
related to Feature #560 add an option to mark version as invisible New
related to Feature #1245 close versions New 2008-05-16
related to Patch #1676 Only show incomplete target versions New 2008-07-23

History

2008-07-21 01:50 - Otavio Salvador

I fully agree with the concept.

2008-07-21 03:37 - Nick Read

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).

2008-07-21 18:18 - Peter Van den Bosch

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.

2008-07-23 14:37 - Artem Vasiliev

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}

2008-07-23 18:18 - Artem Vasiliev

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

Also available in: Atom PDF