statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Related data not shown in CP search results #2476

Open rcknr opened 4 years ago

rcknr commented 4 years ago

Describe the bug When you have a custom column defined for a collection which references related collection entry it won't display in search results.

To Reproduce Steps to reproduce the behavior: Let's say we have two collections: Books and Authors. Each Book entry has a collection field that references a single Author entry. In folder.yaml for Books you have something like:

columns:
  - title
  - author.title

This will display the title of the author related to the Book entry. Once you start searching this Book collection this column will disappear.

Expected behavior Display related data in search results.

Environment details (please complete the following information): Latest Statamic (2.11.16)

rcknr commented 4 years ago

I've came up with a fix for this. It'd be great if that was added. Here's the patch:

show-additional-columns-with-search.patch.zip

rcknr commented 4 years ago

@jasonvarga Any comment on this? I have additionally implemented search by related fields. Can imagine that could be useful for many.

marcusand commented 4 years ago

@rcknr thanks for the fix! how come no one from the official side is taking care of this?

rcknr commented 4 years ago

I think officially everyone has moved on to v3. From what I've seen so far, however, v3 has some of these type of shortcomings as well.

marcusand commented 4 years ago

I see...we just bought some licences for v2 and seeing that it is not really supported anymore is a bummer

jackmcdade commented 4 years ago

The upgrade to v3 is 100% free if you just bought v2. Also, v2 is still supported, but at this point really only security/critical fixes.

marcusand commented 4 years ago

ah all right, thank you