Feature #26081

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

Added by jb cbdse 7 months ago. Updated 6 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues list
Target version:-
Resolution:

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.

26081.patch.txt Magnifier - patch to set @inline = false on 'long text' columns and display in search results with a label (1.25 KB) jb cbdse, 2017-06-01 16:52


Related issues

Related to Redmine - Patch #21705: Option for long text custom fields to be displayed using ... Closed

History

#1 Updated by Mischa The Evil 7 months 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.

#2 Updated by jb cbdse 6 months 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.

#3 Updated by Mischa The Evil 6 months 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.

#4 Updated by Mischa The Evil 6 months ago

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

#5 Updated by Mischa The Evil 6 months ago

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

#6 Updated by jb cbdse 6 months 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.

#7 Updated by Mischa The Evil 6 months 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.

Also available in: Atom PDF