Feature #32818
closed
Add a system setting for default results display format of project query
Added by Sebastian Paluch almost 5 years ago.
Updated almost 4 years ago.
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
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.
- Target version set to Candidate for next major release
- 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.
- Assignee set to Marius BĂLTEANU
I would like to review this patch.
Thanks to Marius for reviewing the patch and suggesting improvements!
I think attached code is better, because the patch will be more DRY.
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
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:
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.
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.
- 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
- Related to Feature #35795: Settings for global and user default custom ProjectQuery added
Also available in: Atom
PDF