Project

General

Profile

Actions

Feature #26081

closed

Allow full_width_layout long-text custom fields to appear in the issue list like 'Description' (as a block column)

Added by jb cbdse almost 7 years ago. Updated about 5 years ago.

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

0%

Estimated time:
Resolution:
Fixed

Description

I see that issue #21705 will allow for long text custom fields to be edited and viewed more similarly to the Description field. The examples given are "Description, Release Notes, Testing Steps", etc.

I don't believe that patch will add the feature I am looking for.

When performing a query, after "Group results by" there is an option for "Show". The only choice is "Description". Choosing this will show the description full width beneath each row. I found that this is controlled by a variable in the QueryColumn class called @inline. The QueryCustomFieldColumn class extends the QueryColumn class and hard-codes the @inline variable to 'true'. I would like to be able to "Show" long text custom fields similar to the Description.

This would allow, say, a query where "status is 'testing'" and have the search results show 'Testing steps' beneath each item. Or, a query where "version is 3.3" and show "Release Notes" beneath each item.

Currently when you select "description", the description is shown, but without a label. If you can choose custom fields, then the text would need a label. Such as "Release notes: blah"

I haven't been able to test this against trunk. I wasn't able to get a copy of trunk working, so I don't know for sure if this was also resolved in addition to #21705.

I've tried to search thoroughly if this has already been requested or implemented some other way, and I can't find anything. I also did a search for every instance of "call_hook" in the code, and I don't think this can be implemented with a plugin.


Files

26081.patch.txt (1.25 KB) 26081.patch.txt patch to set @inline = false on 'long text' columns and display in search results with a label jb cbdse, 2017-06-01 16:52
0002-Styles-for-block-column-name.patch (1.03 KB) 0002-Styles-for-block-column-name.patch Marius BĂLTEANU, 2019-02-03 20:42
0001-Show-full-width-layout-custom-fields-as-block-column.patch (5.13 KB) 0001-Show-full-width-layout-custom-fields-as-block-column.patch Marius BĂLTEANU, 2019-02-03 20:42
block_columns.png (62.6 KB) block_columns.png Marius BĂLTEANU, 2019-02-03 20:45

Related issues

Related to Redmine - Patch #21705: Option for long text custom fields to be displayed using full widthClosedJean-Philippe Lang

Actions
Related to Redmine - Defect #32768: Internal Error when issue text custom field is shown in Spent time query resultsClosedGo MAEDA

Actions
Related to Redmine - Defect #32859: Issue list: long text custom field missing in PDF exportClosedGo MAEDA

Actions
Related to Redmine - Defect #33169: Issues CSV export does not include custom fields with "Full width layout" enabledClosedGo MAEDA

Actions
Actions #1

Updated by Mischa The Evil almost 7 years ago

  • Tracker changed from Defect to Feature
  • Subject changed from Allow custom fields to appear in search results like Description to Allow custom fields to appear in the issue list like 'Description' (as an inline column)

jb cbdse wrote:

[...]
I don't believe that patch will add the feature I am looking for.

Indeed. That feature does not include the addition of the ability to render custom fields as inline columns.

Actions #2

Updated by jb cbdse almost 7 years ago

Here's the patch we did on 3.3.3.

Mashing 'description' onto the css classes of custom fields is not ideal, but it got the job done.

I can't test against trunk. I haven't been able to get a checkout of trunk working.

Actions #3

Updated by Mischa The Evil almost 7 years ago

  • Subject changed from Allow custom fields to appear in the issue list like 'Description' (as an inline column) to Allow long-text custom fields to appear in the issue list like 'Description' (as a block column)

Thanks for sharing your patch.

jb cbdse wrote:

Mashing 'description' onto the css classes of custom fields is not ideal, but it got the job done.

It is indeed far from ideal and certainly not (yet) ready for integration. It also misses the correct rendering of the values using a div.wiki element to wrap the p element. This can (and probably will) cause problems rendering formatted values (especially thinking about syntax highlighting here).

jb cbdse wrote:

I can't test against trunk. [...]

The patch will need some modifications (in line with r16367 for #1474) for trunk compatibility.

I have been pondering about this feature for some time, and I think it could be a nice improvement on top of #21705. I'll explain. With #21705, full_width_layout long-text custom field columns are still rendered as inline columns while the content they'll hold would be presumed to render with a full-width layout. This can make the values hard to read and — as such — the (inline) column not-very usable. If we have #21705 extended in such a way that it'll render full_width_layout long-text custom field columns as block columns, it might improve the usability of it. I'll ping the author of #21705 (and also #1474) to get his opinion on this FR.
For the above, TS's patch should be modified to also check on custom_field.full_width_layout? (like if custom_field.field_format == "text" && custom_field.full_width_layout? ...).

PS: I have modified the subject to match the terminology of the Redmine code base (the reciprocal of inline) and to precise the request itself.

Actions #4

Updated by Mischa The Evil almost 7 years ago

  • Related to Patch #21705: Option for long text custom fields to be displayed using full width added
Actions #5

Updated by Mischa The Evil almost 7 years ago

Note: TS's patch also changes the custom fields' column on the timelog views, which might not be desired and/or expected.

Actions #6

Updated by jb cbdse almost 7 years ago

Thanks for the feedback. Yeah, I figured someone would know a lot more than me, but I was glad to be able to prove the concept. We ended up changing the <h3> in that patch to something smaller and italicized. We ended up hard-coding something to omit it for the stock 'description' field. When it was big and bold, it looked bad in queries with 'group' criteria - the group headings got lost. I still think it needs a label, but it needs to be relatively unemphasized.

Yes, I agree that basing it off of full_width_layout would be better. There's a "multi column custom fields" plugin, and I originally based it off of the multi_column attribute that it added, but I didn't want to depend on the plugin logic. So, I totally agree about the new field from #21705. Ruby's not my thing, but I might revisit this later if I can get trunk working.

Actions #7

Updated by Mischa The Evil almost 7 years ago

  • Subject changed from Allow long-text custom fields to appear in the issue list like 'Description' (as a block column) to Allow full_width_layout long-text custom fields to appear in the issue list like 'Description' (as a block column)

jb cbdse wrote:

Yes, I agree that basing it off of full_width_layout would be better.

I'll modify the issue subject accordingly.

Actions #8

Updated by Marius BĂLTEANU over 5 years ago

  • Assignee set to Marius BĂLTEANU
Actions #10

Updated by Marius BĂLTEANU about 5 years ago

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

Updated by Marius BĂLTEANU about 5 years ago

  • Assignee deleted (Marius BĂLTEANU)
  • Target version changed from Candidate for next major release to 4.1.0
Actions #12

Updated by Go MAEDA about 5 years ago

  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for contributing the patches.

Actions #13

Updated by Go MAEDA about 5 years ago

  • Status changed from New to Closed
Actions #14

Updated by Marius BĂLTEANU over 4 years ago

  • Related to Defect #32768: Internal Error when issue text custom field is shown in Spent time query results added
Actions #15

Updated by Marius BĂLTEANU about 4 years ago

  • Related to Defect #32859: Issue list: long text custom field missing in PDF export added
Actions #16

Updated by Go MAEDA about 4 years ago

  • Related to Defect #33169: Issues CSV export does not include custom fields with "Full width layout" enabled added
Actions

Also available in: Atom PDF