プロジェクト

全般

プロフィール

Vote #62228

未完了

hides some issues in calendar block in My Page

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
My page_42
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
42
version_id:
0
issue_org_id:
230
author_id:
74
assigned_to_id:
0
comments:
5
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

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.


journals

Oops, line feeds are automatically inserted to my previous
submission.
I uploaded _calendar.rhtml.patch.
--------------------------------------------------------------------------------
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? %>

<%= render :partial => 'common/calendar', :locals =>
{:calendar => calendar } %>
--------------------------------------------------------------------------------
Ca you made a patch instead of a file.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------


related_issues

relates,Closed,12223,Make "My Page"-Widgets filterable

Admin Redmine さんがほぼ2年前に更新

  • カテゴリMy page_42 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0