Defect #15434
closedMy page shows issues which is not assgned to me
0%
Description
The my page shows a lot of issues assigned to me.
When I open link to issues assigned to me, I see the right number of my issues, i.e. ten issues.
When I open issue which I don't know, for example # 13222, I see that this issue doesn't have assignee.
Files
Updated by D G about 11 years ago
Same here. Group assignment is turned off.
Environment: Redmine version 2.4.0.stable.12310 Ruby version 2.0.0-p247 (2013-06-27) [i686-linux] Rails version 3.2.15 Environment production Database adapter Mysql2
Updated by Pavel Potcheptsov about 11 years ago
- Status changed from New to Resolved
Suddenly I've found that I apply a part of code from previous rm version to show 25 assigned issues in /app/views/my/blocks/_issuesassignedtome.html.erb:
<% assigned_issues = Issue.visible.open.find(:all, :conditions => {:assigned_to_id => ([User.current.id] + User.current.group_ids)}, :limit => 25, :include => [ :status, :project, :tracker, :priority ], :order => "#{IssuePriority.table_name}.position DESC, #{Issue.table_name}.updated_on DESC") %> <%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
but then I realised that I should leave _issuesassignedtome.html.erb in default, but change http://www.redmine.org/projects/redmine/repository/entry/branches/2.4-stable/app/helpers/my_helper.rb
This solved my issue.
Updated by Pavel Potcheptsov about 11 years ago
Don't believe..my page shows again issues which is not assigned to me.
Updated by Pavel Potcheptsov about 11 years ago
This seems work for me.
[root@redmine rm2.4.0]# svn diff Index: app/helpers/my_helper.rb =================================================================== --- app/helpers/my_helper.rb (revision 12309) +++ app/helpers/my_helper.rb (working copy) @@ -32,8 +32,8 @@ def issuesassignedtome_items Issue.visible.open. - where(:assigned_to_id => ([User.current.id] + User.current.group_ids)). - limit(10). + where(:assigned_to_id => [User.current.id]). + limit(25). includes(:status, :project, :tracker, :priority). order("#{IssuePriority.table_name}.position DESC, #{Issue.table_name}.updated_on DESC"). all Index: app/models/time_entry.rb =================================================================== Index: app/views/my/blocks/_issuesassignedtome.html.erb =================================================================== --- app/views/my/blocks/_issuesassignedtome.html.erb (revision 12309) +++ app/views/my/blocks/_issuesassignedtome.html.erb (working copy) @@ -1,7 +1,7 @@ <h3> <%= link_to l(:label_assigned_to_me_issues), issues_path(:set_filter => 1, :assigned_to_id => 'me', :sort => 'priority:desc,updated_on:desc') %> - (<%= Issue.visible.open.where(:assigned_to_id => ([User.current.id] + User.current.group_ids)).count %>) + (<%= Issue.visible.open.where(:assigned_to_id => [User.current.id]).count %>) </h3> <% assigned_issues = issuesassignedtome_items %> Index: app/views/my/blocks/_timelog.html.erb =================================================================== --- app/views/my/blocks/_timelog.html.erb (revision 12309) +++ app/views/my/blocks/_timelog.html.erb (working copy) @@ -1,9 +1,12 @@ <h3> <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %> - (<%= l(:label_last_n_days, 7) %>) + (<%= l(:label_this_week) %>) </h3> <% -entries = timelog_items +entries = TimeEntry.find(:all, + :conditions => ["#{TimeEntry.table_name}.user_id = ? AND #{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", @user.id, Date.today - (Date.today.cwday - 1) % 7, Date.today - (Date.today.cwday - 1) % 7 + 6], + :include => [:activity, :project, {:issue => [:tracker, :status]}], + :order => "#{TimeEntry.table_name}.spent_on DESC, #{Project.table_name}.name ASC, #{Tracker.table_name}.position ASC, #{Issue.table_name}.id ASC") entries_by_day = entries.group_by(&:spent_on) %> ===================================================================
Updated by Jaak Ristioja almost 11 years ago
This issue is marked Resolved. In what version of Redmine is this fixed in?
Updated by Pavel Potcheptsov almost 11 years ago
I think that this issue has appeared due custom changes in redmine's code.
And it has been resolved with provided code.
There is no changes in redmine's source code.
Updated by Jan Niggemann (redmine.org team member) over 10 years ago
- Status changed from Resolved to Closed
- Resolution set to Invalid