Skip to content

Show relationship type labels in the related resources manager - #13070

Open
rayondemiel wants to merge 1 commit into
archesproject:dev/8.1.xfrom
rayondemiel:fix/ontology-select-relationship-label
Open

rayondemiel wants to merge 1 commit into
archesproject:dev/8.1.xfrom
rayondemiel:fix/ontology-select-relationship-label

Conversation

@rayondemiel

Copy link
Copy Markdown
Contributor

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

In the related resources manager of a semantic graph, the ontology property select of a relationship shows a raw id (for example ac41d9be-79db-4256-b368-2f4559cfbe55) when the stored type is a concept, such as the default "is related to". getSelect2ConfigForOntologyProperties uses the stored value as its displayed text, and on 8.1.x get_related_resources returns relationshiptype_label but no label for the inverse type.

This PR:

  • returns inverserelationshiptype_label from get_related_resources, as dev/8.2.x already does;
  • adds an optional label argument to getSelect2ConfigForOntologyProperties, shown instead of the raw value until another property is chosen (other callers are unchanged);
  • passes the labels from the manager's template to its four selects.

Tested on 8.1.5: the select shows "is related to" on both directions of a relationship.

Investigation and patch prepared with Claude Code (Anthropic); reviewed and tested by the contributor.

Issues Solved

No issue opened.

Checklist

  • I targeted one of these branches:
    • dev/8.2.x (under development): features, bugfixes not covered below
    • dev/8.1.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/7.6.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

Ticket Background

Further comments

Touches the same template as the related resources manager keys fix (different lines). Whether a concept type and ontology properties should share this field on semantic graphs is left to the maintainers; this PR only displays the stored value's label.

A relationship whose type is a concept (such as the default "is related
to") showed the concept's id in the ontology property select of the
related resources manager: the select displayed the raw stored value, and
get_related_resources returned no label for the inverse type. Return
inverserelationshiptype_label as 8.2 does, and let the select show the
stored value's label until another property is chosen.

Investigation and patch prepared with Claude Code (Anthropic); reviewed
and tested by the contributor.
@rayondemiel
rayondemiel force-pushed the fix/ontology-select-relationship-label branch from 9d9bfa9 to a2eeaca Compare October 27, 2026 14:57
@github-project-automation github-project-automation Bot moved this to ✅ Done in pipeline Oct 27, 2026
@rayondemiel rayondemiel reopened this Oct 27, 2026
@chiatt
chiatt requested a review from njkim October 27, 2026 15:48
@rayondemiel

Copy link
Copy Markdown
Contributor Author

pr linked #13069 and #13068

@rayondemiel
rayondemiel marked this pull request as ready for review October 27, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants