Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A action-provider
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 7
    • Issues 7
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • action-provider
  • Merge requests
  • !52

fix CreateOrUpdateRelationship to handle symmetric relationships

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed JonGold requested to merge JonGold/action-provider:bidirectional-relationships into master Aug 11, 2021
  • Overview 9
  • Commits 1
  • Pipelines 0
  • Changes 2

The "Create or Update Relationships" action doesn't handle symmetric relationships (e.g. "Spouse of-Spouse of") correctly.

Steps to Replicate

  • Create a new Form Processor with 2 integer inputs "Contact A" and "Contact B".
  • Create an action "Create or Update Relationships" and make the Relationship Type a symmetrical one ("Spouse of", "Sibling of", etc.).
  • Go to Try Out and submit the form with two individual contact IDs.
  • Submit the form again, but reverse the two contact IDs.

Expected Result

The relationship only exists once.

Actual Result

The relationship exists twice.

Comments

The RelationshipCache entity was created to make this sort of issue much simpler. I was also able to simplify the $also_inactive handling.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: bidirectional-relationships