We're updating the issue view to help you get more done. 

Display template rendering when dealing with multiple relationships between the same two records

Description

We emailed about this last week and I now did some more digging since I need this and I'm pretty certain this is a bug, or at least it's not the way it's supposed to work, except I'm not sure how to fix it. I'm on the latest master-fix (including your changes from last night).

So if I have a relationship bundle for storage locations in the object editor and use a very simple display like this:

<l>^ca_storage_locations.idno</l>
(bearbeitet: ^ca_objects_x_storage_locations.effective_date)

all is good as long as there are not two relationships with the same location record (using different rel types or edates or whatever). If there are two relationships between object A and location B, the second part of the display is repeated for both in each releationship display. Since the displays are in storage location context in these bundles, I guess that behavior is technically kind of correct but not really helpful because you'd expect this to be restricted not only to relationships to the object you're currently editing (which works fine) but also to the very relationship instance that is being displayed right now.

This is all a bit complicated to explain so I hope this makes sense.

My guess is that we have to restrict the SearchResult::get() call in displayHelpers.php:2238 (line number in master-fix, might be different in develop) to the current relationship instance somehow.

Environment

None

Assignee

User known

Reporter

Stefan Keidel

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure