Patch #29482

Query system for Projects page

Added by Marius BALTEANU 3 months ago. Updated 7 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:

0%

Category:Projects
Target version:Candidate for next major release

Description

The attached patch adds the existing query system (from issues and time entries) to the projects page, including the possibility to save custom queries and export to csv.

Available columns:
  • Name (default column)
  • Status
  • Short Description (default column)
  • Identifier (default column)
  • Subproject of
  • Public
  • Created
  • Custom fields
Available filters:
  • Status with active, closed and archived
  • Name
  • Description
  • Public
  • Created

Some mentions:
- I chose to open a new ticket because the patch implements multiple related issues
- One of the most reported issue generated by Redmine 3.4.0 is the multiple columns projects page which is considered by many users a defect (7 issue reported since then, please see #26853)
- Even if this patch reverts the multiple columns listing, we can build in a future release an alternative listing of projects and allow users to switch between the views
- More filters and columns can be added, but I wanted to keep this patch as small as possible.

Any feedback is welcome.

projects.png (205 KB) Marius BALTEANU, 2018-09-02 18:43

0002-filter-after-projects.patch Magnifier (2.65 KB) Marius BALTEANU, 2018-09-02 22:45

0003-filter-after-parent-project.patch Magnifier (1.92 KB) Marius BALTEANU, 2018-09-23 11:00

0004-Set-default-configuration-for-the-projects-list.patch Magnifier (3.78 KB) Marius BALTEANU, 2018-09-26 22:37

0001-Queries-for-Projects.patch Magnifier (40.2 KB) Marius BALTEANU, 2018-09-26 22:37


Related issues

Related to Redmine - Feature #26641: display and export project information New
Related to Redmine - Patch #26853: Fix hardcoded project-index width for webkit and mozilla ... Needs feedback
Related to Redmine - Feature #6655: Add filter for projects view page New 2010-10-13
Related to Redmine - Feature #572: My projects (or favourite projects) New
Related to Redmine - Patch #23954: Shows the date of the last activity on Projects administr... New
Related to Redmine - Patch #13696: Projects admin, show issues count New
Related to Redmine - Feature #28678: Alow to filter projects where the specific role is used New
Related to Redmine - Feature #20081: Filter issues and time entries by project status Closed
Related to Redmine - Patch #29951: Quick design fix/proposals for projects index page New
Related to Redmine - Feature #24841: Hide projects user is only admin but not has assigned any... New
Duplicated by Redmine - Feature #12329: Project filtering in common view Closed
Duplicated by Redmine - Feature #22966: Add ability search/filter project by project's custom fields Closed
Duplicated by Redmine - Feature #22327: Sort Projects by status and custom field values Closed
Duplicated by Redmine - Feature #2399: Custom field filtering for projects Closed 2008-12-25

History

#1 Updated by Marius BALTEANU 3 months ago

  • Related to Feature #26641: display and export project information added

#2 Updated by Marius BALTEANU 3 months ago

  • Duplicated by Feature #6655: Add filter for projects view page added

#3 Updated by Marius BALTEANU 3 months ago

  • Related to Patch #26853: Fix hardcoded project-index width for webkit and mozilla browsers added

#4 Updated by Marius BALTEANU 3 months ago

  • Duplicated by deleted (Feature #6655: Add filter for projects view page)

#5 Updated by Marius BALTEANU 3 months ago

  • Related to Feature #6655: Add filter for projects view page added

#6 Updated by Marius BALTEANU 3 months ago

  • Description updated (diff)

#7 Updated by Marius BALTEANU 3 months ago

Add filter after "Project" in order to be able to select specific projects or "<< my projects >>".

As a technical note, I'm not sure if the "search_project" is the proper permission for the ProjectQuery, but I didn't find another one and without it, the QueryController#filter returns "Unauthorized".

#8 Updated by Marius BALTEANU 3 months ago

  • Duplicated by Feature #12329: Project filtering in common view added

#9 Updated by Marius BALTEANU 3 months ago

  • Duplicated by Feature #22966: Add ability search/filter project by project's custom fields added

#10 Updated by Marius BALTEANU 3 months ago

  • Duplicated by Feature #22327: Sort Projects by status and custom field values added

#11 Updated by Marius BALTEANU 3 months ago

  • Related to Feature #572: My projects (or favourite projects) added

#12 Updated by Mizuki ISHIKAWA 3 months ago

+1
It's a great idea!
Query system is necessary for users who are members of many projects.
And I think the table is more beautiful than the current layout.

I hope that this change will enter the trunk as soon as possible.

#13 Updated by Jens Krämer 3 months ago

I don't know.

I'd say most users of most installations do not have access to that many projects at the same time to justify the full filtering capabilities here.

While I can see the appeal in just reusing the Issues / Time entries list and filter UI, I don't think that just because we already have that, it is the best solution for this page. Agreed, the current multi-column layout has issues to the point that we stuck to the single-column display at Planio, but I'd vote for fixing that instead of turning the projects page into just another "dull" tabular listing.

This page is one of several possible entry points for users to drill down deeper and as such, a more visually appealing layout would be better imho. If there really is need for search / filtering (is there? you can always use Ctrl-F as long as no pagination is involved), a single search slot searching over titles, identifiers and descriptions and limiting the list of projects on the fly would be enough.

As an admin who needs to manage projects instead of just looking at them and finding / selecting one, you always have the full list at /admin/projects.

#14 Updated by zhangzhi liao 3 months ago

HOW I setup the Patch ?

#15 Updated by zhangzhi liao 3 months ago

RUN patch -p1 < the-patch-file.patch.project did not work out .
shows:
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

#16 Updated by zhangzhi liao 3 months ago

Hunk #2 FAILED at 250.
1 out of 2 hunks FAILED -- saving rejects to file public/stylesheets/application.css.rej

#17 Updated by Bernhard Rohloff 3 months ago

I aggree with Jens Krämer on the fact that a table can't be the default way to show an overview of the projects landscape, as it's hard for the user to orientate himself within the project structure. That said, it could be indeed a very useful additional view and a great way for project managers to get a quick status report over their projects.

And yes, the current implementation of the projects view is horrible! Perhaps we can start a discussion about ideas for a better solution on the forums or in the discord channel..!?

#18 Updated by Marius BALTEANU 3 months ago

zhangzhi liao wrote:

HOW I setup the Patch ?

Please use forum to request help.

#19 Updated by zhangzhi liao 3 months ago

I run
sudo patch p0 < 0001-Queries-for-Projects.patch
It's show
Hunk #2 FAILED at 250.
1 out of 2 hunks FAILED - saving rejects to file public/stylesheets/application.css.rej.

#20 Updated by Marius BALTEANU 3 months ago

Jens Krämer wrote:

I don't know.

Hi Jens,

First of all, thanks for your feedback. Please find my thoughts below.

I'd say most users of most installations do not have access to that many projects at the same time to justify the full filtering capabilities here.

In our instance (which is a single instance and not a Saas like), we have more than 200 active projects and our non admin internal users have access in average to almost 30 projects (including the public ones), but they are actively involved only in 4 - 8 projects. This is my case also, even if I'm an admin user, I work daily only with 4 projects. I thought that is only our problem, but I looked in the tickets and the number of Redmine.org users that requested in the past a better project list, filter capabilities and custom queries is quite big. I've related to this ticket only 7 tickets, but there are a lot more and I'll go through all of them these days.

While I can see the appeal in just reusing the Issues / Time entries list and filter UI, I don't think that just because we already have that, it is the best solution for this page. Agreed, the current multi-column layout has issues to the point that we stuck to the single-column display at Planio, but I'd vote for fixing that instead of turning the projects page into just another "dull" tabular listing.

I didn't work on this just because we already have that, I really think that once we have the query system in place for the projects list, we can develop some nice features, including a multi-column layout. When we started internally the discussions regarding the Projects page, we agreed that first we need the possibility to filter the projects and right after that, an alternative view (we've already started work on some screens using a masonry layout) because neither of us think that the tabular listing is the best solution. I'll post the screens when they are ready, but until then, please feel free to contribute if you have a proposal.

This page is one of several possible entry points for users to drill down deeper and as such, a more visually appealing layout would be better imho. If there really is need for search / filtering (is there? you can always use Ctrl-F as long as no pagination is involved), a single search slot searching over titles, identifiers and descriptions and limiting the list of projects on the fly would be enough.

I can tell you that it becomes annoying to use multiple times per day the CTRL + F or the quick jump box (both combination requires some extra clicks/steps). Also, I consider the browser buttons non user friendly for users (this is why I worked on #8888).

As an admin who needs to manage projects instead of just looking at them and finding / selecting one, you always have the full list at /admin/projects.

As admin, we need additional columns, filters capabilities and informations that the current list do not provide, please see two examples: #13696, #23954.

In conclusion, I'm not saying that my patch is perfect or the best solution, I'm just saying that is a good starting point (and a must IMHO) to build a nice and useful projects list.

#21 Updated by zhangzhi liao 3 months ago

I really want use that Patch,but did not works out .

Environment:
Redmine version 3.4.6.stable
Ruby version 2.3.7-p456 (2018-03-28) [x86_64-linux]
Rails version 4.2.8
Environment production
Database adapter Mysql2
SCM:
Subversion 1.10.0
Git 2.17.1
Filesystem
Redmine plugins:
no plugin installed

#22 Updated by Marius BALTEANU 3 months ago

zhangzhi liao wrote:

I really want use that Patch,but did not works out .

Environment:
Redmine version 3.4.6.stable
Ruby version 2.3.7-p456 (2018-03-28) [x86_64-linux]
Rails version 4.2.8
Environment production
Database adapter Mysql2
SCM:
Subversion 1.10.0
Git 2.17.1
Filesystem
Redmine plugins:
no plugin installed

The patches are made against Redmine trunk version (future 4.0.0 Release) and not current Redmine 3.4.6 version. Please again, use Forums to request help. Here we should discuss about the feature implementation in the Redmine core.

#23 Updated by Marius BALTEANU 3 months ago

  • Duplicated by Feature #2399: Custom field filtering for projects added

#24 Updated by Marius BALTEANU 3 months ago

  • File deleted (0001-Queries-for-Projects.patch)

#25 Updated by Marius BALTEANU 3 months ago

  • File 0001-Queries-for-Projects.patch added

Updated the patch to fix some issues when exporting columns to CSV and to prevent some n+1 queries.

#26 Updated by Marius BALTEANU 3 months ago

  • File deleted (0001-Queries-for-Projects.patch)

#27 Updated by Marius BALTEANU 3 months ago

  • File 0001-Queries-for-Projects.patch added

Updated the patch to remove some unused CSS classes.

#28 Updated by Zbigniew Nowacki 3 months ago

+1

This is a very useful feature.
Users, who have access to few projects don’t care the view of Project window.
I have usually a lot of active projects and it would be much better to use a table view.

Table view is also a kind of raport (csv export is implemented). I think some additional information (columns) could be useful. I mean sums of issues fields:
  • Spent time
  • Estimated time
  • Custom fields (numbers only)

These sums are implemented in an issues view.

I think Description should be left aligned (because of Wiki formatting of this field).

#29 Updated by Marius BALTEANU 3 months ago

  • File 0001-Queries-for-Projects.patch added

Zbigniew Nowacki wrote:

+1

This is a very useful feature.
Users, who have access to few projects don’t care the view of Project window.
I have usually a lot of active projects and it would be much better to use a table view.

Thanks for your feedback.

Table view is also a kind of raport (csv export is implemented). I think some additional information (columns) could be useful. I mean sums of issues fields:
  • Spent time
  • Estimated time
  • Custom fields (numbers only)

These sums are implemented in an issues view.

I think that it'll be better to add these columns as separated tickets when and after this feature is implemented in order to keep the changes as small as possible.

I think Description should be left aligned (because of Wiki formatting of this field).

Agree, fixed in the attached patch.

#30 Updated by Marius BALTEANU 3 months ago

  • File deleted (0001-Queries-for-Projects.patch)

#31 Updated by Marius BALTEANU 3 months ago

  • Related to Patch #23954: Shows the date of the last activity on Projects administration. added

#32 Updated by Marius BALTEANU 3 months ago

  • Related to Patch #13696: Projects admin, show issues count added

#33 Updated by Marius BALTEANU 3 months ago

  • Target version set to Candidate for next major release

#34 Updated by Marius BALTEANU 3 months ago

  • File deleted (0001-Queries-for-Projects.patch)

#35 Updated by Marius BALTEANU 3 months ago

Updated 0001-Queries-for-Projects.patch to include identifier as a default column.
Added 0003-filter-after-parent-project.patch patch that adds the "Subproject as" option to available filters.

When #26537 is fixed, I'll add the option in Administration to set the default columns.

#36 Updated by Marius BALTEANU 3 months ago

  • Related to Feature #28678: Alow to filter projects where the specific role is used added

#37 Updated by Marius BALTEANU 3 months ago

  • File deleted (0001-Queries-for-Projects.patch)

#38 Updated by Marius BALTEANU 3 months ago

Updated 0001-Queries-for-Projects.patch in order to exclude "Archived" status from project statuses filter (the option is useless because the Archived projects are not returned by default and is not in the scope of this ticket to change the existing behaviour).

Added patch 0004-Set-default-configuration-for-the-projects-list.patch to allow admin users to select the default columns for projects list.

#39 Updated by Fabian Schuttenberg 2 months ago

I just discovered this issue and would like to emphasize that these are very useful features - thank you very much for implementing them.

In addition we may be able to help with testing - just let us know if you think that makes sense.

Finally, if it is not too complicated, we may consider doing a 3.x backport or 3.x plugin for those features since we would love to use it asap.

#40 Updated by Marius BALTEANU about 1 month ago

  • Related to Feature #20081: Filter issues and time entries by project status added

#41 Updated by Marius BALTEANU 29 days ago

Jens Krämer wrote:

While I can see the appeal in just reusing the Issues / Time entries list and filter UI, I don't think that just because we already have that, it is the best solution for this page. Agreed, the current multi-column layout has issues to the point that we stuck to the single-column display at Planio, but I'd vote for fixing that instead of turning the projects page into just another "dull" tabular listing.

Jens, I've added to #29951 two proposals for the projects page.

#42 Updated by Marius BALTEANU 29 days ago

  • Related to Patch #29951: Quick design fix/proposals for projects index page added

#43 Updated by Marius BALTEANU 7 days ago

  • Related to Feature #24841: Hide projects user is only admin but not has assigned any role in the project overview (as it is already done in the project dropdown) added

#44 Updated by Ivan Gretsky 7 days ago

This is a super useful feature. Thanks for making this patch. I did not quite get if it makes possible filtering by custom fields. Hope this feature is available.

Also available in: Atom PDF