Patch #230

hides some issues in calendar block in My Page

Added by Go MAEDA almost 13 years ago. Updated 12 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:My page
Target version:-

Description

I worte patch for Calendar block in "My Page" to add following features.

  • hide issues not assigned to me
  • hide closed issues

I belongs to many projects in my company and Calendar becomes too large and confusing me because too many issues displayed
on the Calendar. So this patch is very useful for me.

I think there must be many people who is troubled by too large Calendar block in My Page.

_calendar.rhtml Magnifier (2.09 KB) Go MAEDA, 2008-02-03 11:01

_calendar.rhtml.patch Magnifier (1.81 KB) Go MAEDA, 2008-02-03 11:01


Related issues

Related to Redmine - Feature #12223: Make "My Page"-Widgets filterable Closed

History

#1 Updated by Go MAEDA almost 13 years ago

Oops, line feeds are automatically inserted to my previous
submission.
I uploaded _calendar.rhtml.patch.

#2 Updated by Go MAEDA almost 13 years ago

Here is a patch for latest Redmine.

BUG: cannot save the status of chexboxes.

Index: app/views/my/blocks/_calendar.rhtml ================================================================= ==
--- app/views/my/blocks/_calendar.rhtml (revision 815)
+++ app/views/my/blocks/_calendar.rhtml (working copy)
@ -1,8 +1,19 @
<h3><%= l(:label_calendar) %></h3>

<% form_tag() do >
<= check_box_tag('cal_hide_not_assigned_to_me', 1,
params[:cal_hide_not_assigned_to_me]) >hide issues not
assigned to me
<
= check_box_tag('cal_hide_closed', @user.id,
params[:cal_hide_closed]) >hide closed issues
<
= submit_tag l(:button_apply), :class => 'button-small'
>
<
end >

<

+hide_not_assigned_to_me =
params[:cal_hide_not_assigned_to_me] nil ? 0 : 1
+hide_closed = params[:cal_hide_closed] nil ? 0 : 1
>

<
calendar = Redmine::Helpers::Calendar.new(Date.today,
current_language, :week)
calendar.events = Issue.find :all,
- :conditions =>
["#{Issue.table_name}.project_id in
(#{@user.projects.collect{|m| m.id}.join(',')}) AND
((start_date>=? and start_date<=?) or (due_date>=? and
due_date<=?))", calendar.startdt, calendar.enddt,
calendar.startdt, calendar.enddt],
- :include => [:project, :tracker,
:priority, :assigned_to] unless @user.projects.empty? %>
:conditions =>
["#{Issue.table_name}.project_id in
(#{@user.projects.collect{|m| m.id}.join(',')}) AND
((start_date>=? and start_date<=?) or (due_date>=? and
due_date<=?)) AND (? = 0 or assigned_to_id = ?) AND (? = 0
or #{IssueStatus.table_name}.is_closed = ?)",
calendar.startdt, calendar.enddt, calendar.startdt,
calendar.enddt, hide_not_assigned_to_me, @user.id,
hide_closed, false],
+ :include => [:project, :tracker,
:priority, :assigned_to, :status] unless
@user.projects.empty? %> {:calendar => calendar } %>

<%= render :partial => 'common/calendar', :locals =>

#3 Updated by Cyril Mougel almost 13 years ago

Ca you made a patch instead of a file.

#4 Updated by Toshi MARUYAMA over 9 years ago

  • Category set to My page

#5 Updated by Daniel Felix almost 8 years ago

Still open.
This patch isn't implemented in Redmine 2.1.2-devel.

Maybe this could be solved to with, or maybe in addition to #12223.

Also available in: Atom PDF