Commit 4206d9931652dfb09518cd424ae9f58a7c8e2113

Authored by Aníbal Pacheco
1 parent a210c1fdcf
Exists in master

Fixes with psql and redmine new versions, include project name in issue block, a…

…pply the filters on creation time

Showing 4 changed files with 12 additions and 6 deletions Side-by-side Diff

app/controllers/my_taskboard_controller.rb View file @ 4206d99
... ... @@ -27,7 +27,7 @@
27 27 .joins('INNER JOIN trackers ON trackers.id = issues.tracker_id') \
28 28 .joins('INNER JOIN projects ON projects.id = issues.project_id') \
29 29 .joins('INNER JOIN enumerations issue_priority ON issues.priority_id = issue_priority.id') \
30   - .where("assigned_to_id = ? AND issue_statuses.is_closed = 0 AND projects.status = 1", @user.id) \
  30 + .where("assigned_to_id = ? AND NOT issue_statuses.is_closed AND projects.status = 1", @user.id) \
31 31 .order("weight ASC, issue_priority.position DESC")
32 32 @not_prioritized = Array.new
33 33 @prioritized = Array.new
app/views/settings/_project.html.erb View file @ 4206d99
... ... @@ -24,7 +24,7 @@
24 24  
25 25 <div id="column_manager">
26 26 <%= render :partial => 'settings/column_manager', :locals => {
27   - :columns => TaskBoardColumn.where(:project => @project.id).order("weight ASC"),
  27 + :columns => TaskBoardColumn.where(:project_id => @project.id).order("weight ASC"),
28 28 :statuses => IssueStatus.all
29 29 }
30 30 %>
app/views/taskboard/index.html.erb View file @ 4206d99
... ... @@ -37,6 +37,9 @@
37 37 <%= issue.priority.name %>
38 38 </p>
39 39 </div>
  40 + <p class="issue-project">
  41 + <%= issue.project.name %>
  42 + </p>
40 43 <h3><%= link_to issue.subject, :controller => :issues, :action => :show, :id => issue.id %></h3>
41 44 <% if defined? issue.assigned_to.name %>
42 45 <p class="meta">
assets/javascripts/task_board.js View file @ 4206d99
... ... @@ -45,10 +45,13 @@
45 45 },
46 46 init: function() {
47 47 var self = this;
48   - $('#taskboard-filters').on('change', 'select', function() {
  48 + $("#taskboard-filters select").each(function() {
49 49 self.filters[$(this).attr('name')] = parseInt($(this).val());
  50 + }).change(function() {
  51 + self.filters[$(this).attr('name')] = parseInt($(this).val());
50 52 self.applyFilters();
51 53 });
  54 + self.applyFilters();
52 55 },
53 56 applyFilters: function() {
54 57 var self = this;