Problem/Motivation

Rules is able to navigate the entity reference items within a Primary Entity Reference field by field delta, but there's no named way to navigate the primary reference itself.

In the field's `preSave()`, the items are sorted by whether they have the primary bool set (presumably so that delta 0 contains the primary), but presumably this can't be relied upon in all circumstances as the field item list could have already been modified against that convention by the time code/Rules is interacting with it.

Screenshot of Rules module interface for navigating a Primary Entity Reference field

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
rules_primary_entity_reference.png127.4 KBjdleonard

Comments

jdleonard created an issue.