Problem/Motivation

Views Add Handler is not very informative when Help is missing, yet views.api.php does not make it clear that relationships can contain help.

Steps to reproduce

  1. Follow the documentation in views.api.php to add a relationship between custom external database tables that all have a structure like
  2. Person table with id
  3. Multiple tables with relationship set as person_id
  4. Quickly get lost as to which relationship to add to create the desired joins

Proposed resolution

Update the documentation to show that help can be used

Remaining tasks

Provide MR

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

Updated views.api.php to show that help text can be provided for relationships

Issue fork drupal-3422845

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

scott_euser created an issue. See original summary.

scott_euser’s picture

Assigned: scott_euser » Unassigned
Priority: Normal » Minor
Status: Active » Needs review
StatusFileSize
new21.11 KB
new28.44 KB

Minor thing, but would have saved me some time, so hoping this tiny addition saves someone else some time in the future. Thanks!

Before adding 'help' key to relationship:

Screenshot without help text in the add relationship handler

After adding 'help' key to relationship:

Screenshot showing help text in the add relationship handler

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems like a straight forward improvement and makes sense to me (I think)

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new657 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

scott_euser’s picture

Status: Needs work » Reviewed & tested by the community

Hmmm that's odd, no phpstan failures. Not sure what needs review bot is complaining about - will revert it back to RTBC. Thanks!

nod_’s picture

Issue tags: +no-needs-review-bot

phpstan and .api.php files have issues in non-CI runs

nod_’s picture

Status: Reviewed & tested by the community » Needs work

Need to change the term so that we don't use dummy.

scott_euser’s picture

Status: Needs work » Needs review

Apologies was trying to keep it in line with the existing code which called the field 'dummy' already + commented about that in that way, but given your steer have updated that + line 501 + the related comment (which you did not ask for, hope that's okay - if not I can create a follow-up).

nod_’s picture

Perfect just need a rtbc now :)

scott_euser’s picture

Thanks! Maybe @smustgrave if you have time you could consider the latest tweaks and RTBC again?

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Happily!

nod_’s picture

got some issues with the pre-commit hooks (same issue the NR-bot runs into) so I'll be committing that when i figure out the workaround.

scott_euser’s picture

Sounds good, thank you both! Hope it's not too painful!

  • nod_ committed 5c30729a on 11.x
    Issue #3422845 by scott_euser, smustgrave: Improve the relationships...
nod_’s picture

Status: Reviewed & tested by the community » Fixed

Committed 5c30729 and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

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