Project

General

Profile

Actions

Feature #32818

closed

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

Added by Sebastian Paluch almost 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Projects
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

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

Files


Related issues

Related to Redmine - Feature #29482: Query system for Projects pageClosedJean-Philippe Lang

Actions
Related to Redmine - Feature #35795: Settings for global and user default custom ProjectQueryClosedMarius BĂLTEANU

Actions
Actions #1

Updated by Marius BĂLTEANU almost 5 years ago

Actions #2

Updated by Takenori TAKAKI over 4 years ago

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.

Actions #3

Updated by Go MAEDA over 4 years ago

  • Target version set to Candidate for next major release
Actions #4

Updated by Go MAEDA over 4 years ago

  • Target version changed from Candidate for next major release to 4.2.0

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.

Actions #5

Updated by Marius BĂLTEANU over 4 years ago

  • Assignee set to Marius BĂLTEANU

I would like to review this patch.

Actions #6

Updated by Marius BĂLTEANU over 4 years ago

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

Actions #7

Updated by Takenori TAKAKI over 4 years ago

Thanks to Marius for reviewing the patch and suggesting improvements!
I think attached code is better, because the patch will be more DRY.

Actions #8

Updated by Go MAEDA over 4 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for improving Redmine.

Actions #9

Updated by Mike K over 4 years ago

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:

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

Please help me, i need this patch.

Actions #10

Updated by Marius BĂLTEANU over 4 years ago

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.

Actions #11

Updated by Go MAEDA over 3 years ago

  • Subject changed from Add a system settings for default results display format of project query to Add a system setting for default results display format of project query
Actions #12

Updated by Mischa The Evil about 3 years ago

  • Related to Feature #35795: Settings for global and user default custom ProjectQuery added
Actions

Also available in: Atom PDF