Patch #7443

Found-in-version patch

Added by Brian Lindahl about 8 years ago. Updated about 2 years ago.

Status:ClosedStart date:2011-01-25
Priority:NormalDue date:
Assignee:-% Done:

80%

Category:Issues
Target version:-

Description

Adds an issue attribute, 'Found in version'. 'Found in version' is the version the issue was found in, and is filled in by the submitter. It can and should only be a single-selection. This field is useful for issue reproduction purposes. You can only select 'locked' versions (in my world, these are versions that have made it past integration and internal release).

found-version-1.0.4.patch Magnifier (28.1 KB) Brian Lindahl, 2011-01-25 19:22

found-version-1.1.0.patch Magnifier (29.5 KB) Brian Lindahl, 2011-01-26 22:09

collision-1.1.0.patch Magnifier (4.07 KB) Brian Lindahl, 2011-01-26 22:18

ss.JPG - sorting/grouping screenshot - works? (79.9 KB) Brian Lindahl, 2011-01-31 17:29

ss2.mht - example of incorrect grouping by target_version (393 KB) Sergey B, 2011-01-31 20:37

found-version-1.1.0.patch Magnifier (30.2 KB) Brian Lindahl, 2011-01-31 21:47

found-version-1.1.0.patch Magnifier - bugfix2 (30.8 KB) Brian Lindahl, 2011-02-11 01:17

found-version-1.1.0.patch Magnifier - Bugfix3 (30.9 KB) Brian Lindahl, 2011-02-14 18:09

found-version-1.1.0.patch Magnifier - Bugfix4 (30.8 KB) Mike Spross, 2011-03-06 07:44

before.png (17.9 KB) Ilia S, 2011-05-11 18:18

after.png (19.4 KB) Ilia S, 2011-05-11 18:18

found-in-version-1.2.1-full.patch Magnifier - rebased against 1.2.1 version of original patch by Brian Lindahl (29.8 KB) Roman Yeryomin, 2011-07-27 16:15

found-in-version-1.3.2-full.patch Magnifier (28 KB) Eric Diaz, 2012-03-28 18:38

found-in-version-1.4.4-full.patch Magnifier (28 KB) Roman Yeryomin, 2012-08-14 13:08

version-type-custom-field.png (32 KB) Go MAEDA, 2016-12-26 16:01


Related issues

Related to Redmine - Feature #1675: Add 'affected version' as a standard field Closed 2008-07-23
Related to Redmine - Feature #685: New Custom Field "Found in Version" New 2008-02-18
Related to Redmine - Feature #8572: Configuration of which versions (by version-status) are s... Closed 2011-06-09

History

#1 Updated by Etienne Massip about 8 years ago

  • Status changed from New to Closed

Closed as duplicate of #1675

#2 Updated by Brian Lindahl about 8 years ago

This version has the following improvements over the version I originally uploaded in #685 and #1675:
  • stronger validation
  • support for bulk edit
  • support for move/copy
  • support for xml builder
  • support for mailer
  • db migration (chose date as last migration in 1.0.4 +1 second)
  • bug fix for project copy (found version was not copied)

#3 Updated by Etienne Massip about 8 years ago

You should add your patch to #1675 as well together with the improvements list

#4 Updated by Brian Lindahl about 8 years ago

I'd rather not maintain multiple issues (since this is also related to #685). All updates to my patch will be stored here. Hopefully the created relation will bring others to this patch issue to get the latest updates.

#5 Updated by Brian Lindahl about 8 years ago

  • Status changed from Closed to Reopened

Also, shouldn't the patch issue only be closed when it gets brought in into the trunk, or that the maintainer of the patch is no longer supporting it?

#6 Updated by Brian Lindahl about 8 years ago

patch migrated to Redmine 1.1.0

#7 Updated by Brian Lindahl about 8 years ago

Use this patch file to fix-up collisions when using this found-version patch with my other patches (#7444, #7445, #7446, #7447).

#8 Updated by Sergey B about 8 years ago

Unfortunately, after applying the "found-version-1.1.0" patch to the Redmine 1.1.0 sorting and grouping by "target_version" field in issue list stops working.

#9 Updated by Brian Lindahl about 8 years ago

Can you take a screenshot? Sorting/grouping by target_version works just fine for me - maybe try clearing your cache?

#10 Updated by Sergey B about 8 years ago

The reason is most likely in wrong database migration that I have made. I executed SQL-command
"ALTER TABLE issues ADD COLUMN found_version_id integer". I didn't found how to perform database migration correctly.

#11 Updated by Brian Lindahl about 8 years ago

Your SQL-command looks correct for the database migration (the only thing left out was the adding the index - this shouldn't affect anything, as far as I know?).

When I upgraded the patch to support Redmine 1.1.0, it looks like the database migration code (for rake db:migrate) was accidentally left out. I've attached a new 1.1.0 patch that includes the database migration file. Again, the db migration file is set to +1 second after the last database migration in Redmine 1.1.0.

#12 Updated by Brian Lindahl about 8 years ago

Bugfix2

The deletion of versions that are in-use as a 'Fixed version' is disabled. This bugfix also disables the deletion of versions that are in-use as a 'Found in version'.

#13 Updated by Brian Lindahl about 8 years ago

Bugfix3

Accidentally removed allowing a 'Fixed version' to stay the same, even if the version becomes locked.

#14 Updated by Mike Spross almost 8 years ago

Bugfix4

There's a minor bug in the migration script: the AddFoundInVersion migration should be renamed to AddFoundVersion, otherwise rake db:migrate errors out due to the mismatch between the migration filename and the class name.

I've added a new version of the patch file with this change (since it was such a minor change I just edited the latest patch file by hand).

#15 Updated by Mike Spross almost 8 years ago

Also, I appreciate the time and effort you put into this, Brian. I've also been scratching my head as to why this hasn't be integrated in some shape or form yet into the main project.

However, something I didn't think about until after applying the patch is that since the current implementation adds the "Found in version" directly to the issue model and view, it affects all trackers, which is problematic if you have multiple trackers for a project. At our company, for example, we use Bug, Feature, and Task trackers for all of our projects, but the "Found in version" field only really makes sense for issues filed in the Bug tracker.

I can easily get around this myself by either making the field not required in the view, or adding a hack to only display the field for the Bug tracker, but neither solution is really ideal. I suppose I could also get around it without changing any code by simply adding a dummy version to each project that users can select when creating new Feature or Task issues.

This makes me wonder though if this patch has a better chance of getting integrated if it implements a new custom field type that can be populated with project versions, so that it "plays nice" with multiple trackers (since custom fields can already be enabled or disabled on a per-tracker basis). In other words, something closer to what was originally suggested in #685.

I'm not sure how easy it would be to implement this as a new custom field type, but I will look into this some more and see if I can create a patch that implements it this way. If anyone's interested, let me know.

#16 Updated by Paulo Oliveira almost 8 years ago

Can I use the patch added by Mike with Redmine version 1.1.2???

If I use this patch will I be able to update my Redmine to newer versions?

#17 Updated by Ilia S almost 8 years ago

I applied the 1.1.0 patch on Redmine 1.1.3 .

It were no errors during patching, but I am getting Found in version can't be blank error message than creating a new issue. ( obviously, I selected found in version from list)
What can be wrong? Should I downgrade from 1.1.3?

#18 Updated by Brian Lindahl almost 8 years ago

When you create a new issue, you must give it a 'Found in version'. It's a required field in this patch. If you wish, you can change this in
the file 'app/views/issues/_attributes.rhtml'.

#19 Updated by Ilia S almost 8 years ago

Brian, thanks for your reply!
Indeed, I give a 'Found in version' before pressing Create, but after that 'Found in version' is empty and an error message shown( see screenshots)

#20 Updated by Brian Lindahl almost 8 years ago

I wasn't able to reproduce this problem. Can you give me the details of version 10.3 (status, sharing, owned by project, etc.) as well as the project heirarchy?

If it was a shared version, test a non-shared version? Shared versions work fine in 1.1.0, but things could have changed in 1.1.3. Try it with 1.1.0?

#21 Updated by Ilia S almost 8 years ago

First of all, your patch is working fine with 1.1.0!
My test project is simply one project without subprojects, version 10.3 is locked, shared with all projects, owned by test project. Non-shared version does not work also.

#22 Updated by Roman Yeryomin over 7 years ago

Hello!
Very needed patch!
Is this going to be ported to 1.2 version?

#23 Updated by Terence Mill over 7 years ago

+ for this as issue custom field type

#24 Updated by Roman Yeryomin over 7 years ago

Ok, I've modified the original patch to apply to 1.2.1
It applies with offsets and fuzzes but I simply didn't have much time for that.

#25 Updated by Eric Diaz almost 7 years ago

Hi i 'm just trying to install it on 1.3.1. i did some merge manually. All the files and database are ok but i can't see the new field in my screen. There is nothing in the log file. Any Idea ?
Regards

#26 Updated by Roman Yeryomin almost 7 years ago

Eric Diaz wrote:

Hi i 'm just trying to install it on 1.3.1. i did some merge manually. All the files and database are ok but i can't see the new field in my screen. There is nothing in the log file. Any Idea ?
Regards

you should have at least one locked version there...
if you can make a patch against 1.3 I will be happy to test it

#27 Updated by Eric Diaz almost 7 years ago

Thanks Roman.
I can see the field now
But i can't sort issues anymore on query form. I click on apply link and nothing happens.
I'm working on it

#28 Updated by Eric Diaz almost 7 years ago

Hi all
Here is the patch for 1.3.2 (Tested also on 1.3.1).
Don't forget to create the new column in the issues Table.

The issue i encountered previously was not connected to this patch but to the Extra query operators plugin (http://www.redmine.org/boards/3/topics/21015?page=2&r=24993)

regards

#29 Updated by Roman Yeryomin over 6 years ago

Seems that I successfully ported this to 1.4.4 - 2 weeks in production already.

#30 Updated by Dipan Mehta almost 6 years ago

How is this issue any different from #2096, which is already in the release?

#31 Updated by Roman Yeryomin almost 6 years ago

Dipan Mehta wrote:

How is this issue any different from #2096, which is already in the release?

It tracks released versions so you cannot choose a version which is not yet released and also which is closed (unsupported).
I see it as having another custom field type - 'version'.

#32 Updated by Go MAEDA about 2 years ago

  • Related to Feature #8572: Configuration of which versions (by version-status) are shown in version-format custom fields added

#33 Updated by Go MAEDA about 2 years ago

This "Found-in-version" can be realized by using version type custom field.

As of Redmine 2.5.0, we can configure version type custom field to list specific status (open / locked / closed) of versions only. (#8572)

Also available in: Atom PDF