Problem/Motivation

When browsing the list of relationships at /admin/content/crm/relationship, you only see the active relationships.

This is caused by the logic in \Drupal\crm\ListBuilder\RelationshipListBuilder::getEntityListQuery:

    $query = $this
      ->getStorage()
      ->getQuery()
      ->condition('status', TRUE)
      ->accessCheck(TRUE)
      ->sort('id');

This seems rather weird, since the overview has a row called "Status", but it never shows disabled ones.
Also, when you disable a relationship by editing it, and then want to re-enable it, you cannot find it back, since it disappeared from the list, which is a weird user experience.

Is this by design for a particular reason, or an oversight?
Given the specific override of getEntityListQuery(), it seems like this was on purpose?

Issue fork crm-3567093

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

svendecabooter created an issue. See original summary.

jdleonard’s picture

jdleonard’s picture

Assigned: jdleonard » Unassigned
Status: Active » Needs review
jdleonard’s picture

Assigned: Unassigned » jdleonard
Status: Needs review » Needs work
jdleonard’s picture

Assigned: jdleonard » Unassigned
Status: Needs work » Needs review

This uncovered another bug: the RelationshipController table captions weren't showing due to use of #title that should have been #caption, which I fixed.

There was a test failure due to testRelationshipController testing the wrong path and failing to delete all the relationships. Test fixed.

bluegeek9 made their first commit to this issue’s fork.

bluegeek9’s picture

Status: Needs review » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging CRM as a favorite on the project page to help others discover it and show your support.
  • Review the Developer Docs for accuracy and clarity.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.