only showing enabled story trackers in story form

ref #3786
pull/6827/head
Gregor Schmidt 14 years ago
parent 466bcbe181
commit 651255197a
  1. 9
      app/helpers/rb_common_helper.rb
  2. 2
      app/views/rb_stories/_helpers.html.erb

@ -116,4 +116,13 @@ module RbCommonHelper
args.push(:plugin => 'redmine_backlogs')
javascript_include_tag *args
end
def available_story_trackers
trackers = Tracker.find(:all, :conditions => {:id => Setting.plugin_redmine_backlogs[:story_trackers]},
:order => 'position')
trackers &= @project.trackers if @project
trackers
end
end

@ -8,7 +8,7 @@
</select>
<select class="tracker_id helper" id="tracker_id_options">
<% Tracker.find_all_by_id(Setting.plugin_redmine_backlogs[:story_trackers]).each do |tracker| %>
<% available_story_trackers.each do |tracker| %>
<option value="<%= tracker.id %>">
<%= tracker.name %>
</option>

Loading…
Cancel
Save