プロジェクト

全般

プロフィール

Vote #80605

完了

Add a system setting for default results display format of project query

Admin Redmine さんが約4年前に追加. 約4年前に更新.

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

0%

予定工数:
category_id:
11
version_id:
152
issue_org_id:
32818
author_id:
115781
assigned_to_id:
332
comments:
12
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Add a system settings for default results display format ("Display results as") of project query, so that we make query results to be shown as list by default.

Related to #29482.

Environment:
  Redmine version                4.1.0.stable
  Ruby version                   2.5.7-p206 (2019-10-01) [x64-mingw32]
  Rails version                  5.2.4.1
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Subversion                     1.11.1
  Git                            2.19.1
  Filesystem                     
Redmine plugins:
  no plugin installed

journals

--------------------------------------------------------------------------------
I made a patch that enable to set the default 'display type' of project list.
We can select either "Boar" or "List" on the "settings?Tab=project" as shown below.

!{width:400px}setting_project_list_display_type.png!
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I think there are many users who prefer "List" style over "Board". This is a useful feature for those users.

The patch looks good to me. Setting the target version to 4.2.0.
--------------------------------------------------------------------------------
I would like to review this patch.
--------------------------------------------------------------------------------
Thanks Takenori TAKAKI for writing the patch.

I propose few changes in the attached patch in order to keep the existing logic, please let me know what do you think.

Tests pass: https://gitlab.com/redmine-org/redmine/pipelines/116338730
--------------------------------------------------------------------------------
Thanks to Marius for reviewing the patch and suggesting improvements!
I think attached code is better, because the patch will be more DRY.
--------------------------------------------------------------------------------
Committed the patch. Thank you for improving Redmine.
--------------------------------------------------------------------------------
Hello, i cant apply this patch to my Redmine (4.1.0.stable). When i execute this command on home project directory i got this:
<pre>
patch < 0001-Add-system-setting-for-default-results-display-forma.patch
can't find file to patch at input line 19
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|From a6110fa9d370ca31c365b69403ecd36f92302faa Mon Sep 17 00:00:00 2001
|From: Marius BALTEANU <marius.balteanu@zitec.com>
|Date: Sun, 9 Feb 2020 19:45:53 +0200
|Subject: [PATCH] Add system setting for default results display format of
| project query
|
|---
| app/models/project_query.rb | 4 ++++
| app/models/query.rb | 6 +++++-
| app/views/settings/_projects.html.erb | 7 +++++++
| config/settings.yml | 2 ++
| test/unit/project_query_test.rb | 9 +++++++++
| 5 files changed, 27 insertions(+), 1 deletion(-)
|
|diff --git a/app/models/project_query.rb b/app/models/project_query.rb
|index 54c16d8e6..703e979d5 100644
|--- a/app/models/project_query.rb
|+++ b/app/models/project_query.rb
</pre>
Please help me, i need this patch.
--------------------------------------------------------------------------------
Mike K wrote:
> Hello, i cant apply this patch to my Redmine (4.1.0.stable). When i execute this command on home project directory i got this:
> [...]
> Please help me, i need this patch.

Use @patch -p1 < 0001-Add-system-setting-for-default-results-display-forma.patch@ to apply the patch. Anyway, if still doesn't work, please use forum to request help.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,29482,Query system for Projects page
relates,Closed,35795,Settings for global and user default custom ProjectQuery

Admin Redmine さんが約4年前に更新

  • カテゴリProjects_11 にセット
  • 対象バージョン4.2.0_152 にセット

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

いいね!0
いいね!0