Merge pull request #811 from opf/feature/timelines_filter_assignee

filter for assignee in timelines.
pull/769/merge
Martin Czuchra 11 years ago
commit 91ccf74938
  1. 1
      app/assets/javascripts/timelines.js
  2. 7
      app/assets/javascripts/timelines/TimelineLoader.js
  3. 1
      app/assets/javascripts/timelines_select_boxes.js
  4. 7
      app/models/timeline.rb
  5. 26
      app/views/timelines/filter/_planning_elements.html.erb
  6. 1
      config/locales/de.yml
  7. 1
      config/locales/en.yml
  8. 9
      doc/CHANGELOG.md

@ -378,6 +378,7 @@ jQuery.extend(Timeline, {
project_parents : this.options.parents,
planning_element_types : this.options.planning_element_types,
planning_element_responsibles : this.options.planning_element_responsibles,
planning_element_assignee : this.options.planning_element_assignee,
planning_element_status : this.options.planning_element_status,
grouping_one : (this.options.grouping_one_enabled ? this.options.grouping_one_selection : undefined),
grouping_two : (this.options.grouping_two_enabled ? this.options.grouping_two_selection : undefined),

@ -736,11 +736,18 @@ Timeline.TimelineLoader = (function () {
}
};
TimelineLoader.prototype.provideServerSideFilterHashAssignee = function (hash) {
if (this.options.planning_element_assignee !== undefined) {
hash.assigned_to_id = this.options.planning_element_assignee;
}
};
TimelineLoader.prototype.provideServerSideFilterHash = function() {
var result = {};
this.provideServerSideFilterHashTypes(result);
this.provideServerSideFilterHashResponsibles(result);
this.provideServerSideFilterHashStatus(result);
this.provideServerSideFilterHashAssignee(result);
return result;
};

@ -53,6 +53,7 @@ jQuery(document).ready(function($) {
$("#timeline_options_project_status"),
$("#timeline_options_project_types"),
$("#timeline_options_planning_element_responsibles"),
$("#timeline_options_planning_element_assignee"),
$("#timeline_options_grouping_two_selection")
].each(function (item) {
$(item).autocomplete({ multiple: true,

@ -83,6 +83,7 @@ class Timeline < ActiveRecord::Base
"initial_outline_expansion",
"parents",
"planning_element_responsibles",
"planning_element_assignee",
"planning_element_status",
"planning_element_time",
"planning_element_time_absolute_one",
@ -276,6 +277,12 @@ class Timeline < ActiveRecord::Base
end
end
def selected_planning_element_assignee
resolve_with_none_element(:planning_element_assignee) do |ary|
User.find(ary)
end
end
def available_parents
selectable_projects
end

@ -121,6 +121,32 @@ See doc/COPYRIGHT.rdoc for more details.
} %>
<% end %>
</p>
<p class="tl-form-overflow">
<%= label_tag 'timeline_options_planning_element_assignee',
l("timelines.filter.work_package_assignee") %>
<% if User.current.impaired? %>
<%= select("timeline[options]",
:planning_element_assignee,
filter_select_with_none(
timeline.available_responsibles,
:name, :id),
{:selected => timeline.selected_planning_element_assignee.map(&:id)},
{:multiple => true,
:size => 12}) %>
<% else %>
<%= select "timeline[options]", :planning_element_assignee,
options_for_select([]),
{},
{ :'data-ajaxURL' => api_v2_paginate_users_path,
:multiple => true,
:'data-selected' => filter_select(
timeline.selected_planning_element_assignee,
:name, :id).to_json
} %>
<% end %>
</p>
</div>
</div>
</fieldset>

@ -1466,6 +1466,7 @@ de:
parent: "Zeige Unterprojekte von"
work_package_filters: "Arbeitspakete filtern"
work_package_responsible: "Arbeitspakete von diesem Verantwortlichen anzeigen"
work_package_assignee: "Zugewiesen an"
project_time_filter: "Projekte mit Arbeitspaket eines Typs in einem Zeitfenster"
project_time_filter_historical: "von %{startdate} bis %{enddate}"

@ -1456,6 +1456,7 @@ en:
parent: "Show subprojects of"
work_package_filters: "Filter work packages"
work_package_responsible: "Show work packages with responsible"
work_package_assignee: "Show work packages with assignee"
types: "Show types"
status: "Show status"

@ -29,9 +29,9 @@ See doc/COPYRIGHT.rdoc for more details.
# Changelog
* `#2162` [Accessibility] Required fields MUST be displayed as required - new project_type
* `#2153` [Accessibility] Required fields MUST be displayed as required - group new
* `#2157` [Accessibility] Required fields MUST be displayed as required - enumeration new
* `#2162` [Accessibility] Required fields MUST be displayed as required - new project_type
* `#2228` [Accessibility] low contrast in backlogs task view
* `#2240` [Accessibility] correctly label document language of menu items
* `#2250` [Accessibility] activity icon labels
@ -39,17 +39,12 @@ See doc/COPYRIGHT.rdoc for more details.
* `#2734` [API] Access-Key not supported for all controllers
* `#3120` Implement a test suite the spikes can be developed against
* `#3251` [Timelines] Filtering for Responsible filters everything
* `#3393` [Timelines] Filter Work Packages by Assignee
* `#3409` New Layout for fallback Login page
* `#3453` Highlight project in bread crumb
* `#3546` Better icon for Timelines Module
* `#3547` Change color of Apply button in Activity
* `#3667` Better icon for Roadmap
* `#3120` Implement a test suite the spikes can be developed against
* `#3251` [Timelines] Filtering for Responsible filters everything
* `#3453` Highlight project in bread crumb
* `#3546` Better icon for Timelines Module
* `#3547` Change color of Apply button in Activity
* `#3667` Better icon for Roadmap
## 3.0.0pre42

Loading…
Cancel
Save