redmine/test/exemplars/version_exemplar.rb
Jean-Philippe Lang 5f8e9d7118 Version sharing (#465) + optional inclusion of subprojects in the roadmap view (#2666).
Each version of a project can be shared with:
* subprojects
* projects in the project hierarchy: ancestors + descendants (needs versions management permission on the root project)
* projects in the project tree: root project + all its descendants (same as above)
* all projects (can be set by admin users only)

Notes:
* when sharing a version of a private project with others projects, its name will be visible within the other projects
* a project with versions used by non descendant projects can not be archived

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3123 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-12-06 10:28:20 +00:00

12 lines
231 B
Ruby

class Version < ActiveRecord::Base
generator_for :name, :method => :next_name
generator_for :status => 'open'
def self.next_name
@last_name ||= 'Version 1.0.0'
@last_name.succ!
@last_name
end
end