ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Version custom fields are missing shared versions (Bug #342)


Added by Eric Davis at 2011-04-17 12:17 am. Updated at 2013-08-23 07:54 pm.


Status:Open Start date:2011-04-17
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Custom Fields
Target version:3.9.0
Remote issue URL: Affected version:3.1.0

Description

When reviewing d8fbdca76 I noticed that it doesn't look like shared versions are supported in the list. Need to confirm and fix this if they are not listed.

File: app/models/custom_field.rb#possible_values_options is scoped to project and only checks the direct association (project.versions)


History

Updated by Eric Davis at 2011-05-29 06:18 pm

Not a 2.0.0-RC blocker

  • Target version deleted (2.0.0)
  • (deleted custom field) set to unstable

Updated by Matthias Scholz at 2012-04-10 01:14 pm

This Bug still affects chiliproject version 3.1.

  • Target version set to 3.2.0

Updated by Matthias Scholz at 2012-05-14 02:55 pm

Using the code permitted by the link from Mischa fixes this Bug:

Editing file app\models\custom_fields.rb:
55 when 'version'
56 # CHANGES HERE (versions -> shared versions)
57 obj.project.shared_versions.sort.collect {|u| [u.to_s, u.id.to_s]}
58 end

Tested on ChiliProject 3.1.0.d61ad0130

  • Status changed from Open to Ready for review

Updated by Felix Schäfer at 2012-06-05 03:47 pm

Could someone have a look at the Redmine code and make a pull request out of it? Thanks.

Updated by Felix Schäfer at 2012-06-05 03:47 pm

  • Status changed from Ready for review to Open
  • Assignee deleted (Eric Davis)

Updated by Holger Just at 2012-06-09 05:43 pm

Pulling this out of 3.2.0 as it was not ready on release day.

  • Target version deleted (3.2.0)
  • Affected version changed from unstable to 3.1.0

Updated by Daniel F. at 2013-07-08 01:54 pm

This bug also affects Version 3.8, see #1280 for further information and a suggested bugfix.

Could you please try to include a patch for 3.9?

  • Target version set to 3.9.0

Updated by Arthur Lee at 2013-08-23 06:26 am

Matthias Scholz wrote:

Using the code permitted by the link from Mischa fixes this Bug:

Editing file app\models\custom_fields.rb:
55 when 'version'
56 # CHANGES HERE (versions -> shared versions)
57 obj.project.shared_versions.sort.collect {|u| [u.to_s, u.id.to_s]}
58 end

Tested on ChiliProject 3.1.0.d61ad0130

I would suggest changing line 57 to
obj.project.shared_versions.sort.collect {|u| [u.project.identifier + ': ' + u.to_s, u.id.to_s]}

Updated by Mischa The Evil at 2013-08-23 07:54 pm

Arthur Lee wrote:

I would suggest changing line 57 to
obj.project.shared_versions.sort.collect {|u| [u.project.identifier + ': ' + u.to_s, u.id.to_s]}

That is basically implementing what I describe in remote issue URL http://www.redmine.org/issues/9850. Though, you use:

obj.project.shared_versions.sort.collect {|u| [u.project.identifier + ': ' + u.to_s, u.id.to_s]}
while in http://www.redmine.org/issues/9850#note-7 I used:
obj.project.shared_versions.sort.collect {|u| ["#{u.project.to_s} - #{u.to_s}", u.id.to_s]}

So, besides the differences in syntax, we differ in what should be prepended to the version name:

You "{project identifier}: " before the "{version name}"
Me "{project name} - " before the "{version name}"

I think it is better to use the project name here instead of the project identifier (which makes the use of a space followed by a dash and a following space more clearly instead of a colon followed by a space) but YMMV ;)

Also available in: Atom PDF