dotCMS / dotCMS/core

CSV import: surface skipped relationship identifiers (not-found & no-READ) in the import summary

Open
#36,429 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OKR : Customer Support Team : Maintenance
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem Statement

When a CSV import resolves relationship columns, related content can be silently dropped from the resulting relationships, with only a server-side Logger.warn and nothing surfaced in the import result shown to the user. There are two such cases in RelationshipUtil / the import flow:

  1. Identifier not foundRelationshipUtil.filterContentlet logs "No contentlet found for identifier '…'" and skips it (pre-existing).
  2. No READ permission — introduced in #35222 (PR #36425): related content the importing user cannot READ is filtered out via permissionAPI.filterCollection(...) in RelationshipUtil.getRelatedContentFromQuery.

In both cases the import reports success with silently incomplete relationships, and the user cannot tell a permission-filtered identifier apart from a genuinely missing one.

Acceptance Criteria
  • When a relationship identifier is dropped during import (not found or filtered by permission), a warning/message is threaded back into the import result (e.g. via RelationshipProcessingBuilder / the ValidationMessages surfaced in the import summary), not just the server log.
  • The message distinguishes "not found" from "no permission" so the user can act on it.
  • Existing behavior (the relationship is still created for the resolvable/authorized identifiers; the row is not aborted) is preserved.
Context / Origin

Follow-up from PR #36425 (fix for #35222). The permission-filtering there was intentionally scoped to the import path and kept as filter-and-warn to avoid aborting import rows. This issue tracks improving visibility of both silent-drop cases together, since the not-found case has the same gap.

Relevant code:

  • dotCMS/src/main/java/com/dotcms/util/RelationshipUtil.javagetRelatedContentFromQuery (permission filter) and filterContentlet (not-found skip)
  • dotCMS/src/main/java/com/dotmarketing/util/ImportUtil.javaprocessRelationships / RelationshipProcessingBuilder (where warnings are surfaced to the import result)
dotCMS Version

Evergreen 26.06.21-01

Severity

Low — visibility/UX improvement; no data loss or security impact.

Links

Freshdesk ticket for the original issue:

https://dotcms.freshdesk.com/a/tickets/36035

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with dotCMS/src/main/java/com/dotcms/util/RelationshipUtil.java, reading getRelatedContentFromQuery and filterContentlet to trace permission-filtered and not-found identifiers. Then inspect dotCMS/src/main/java/com/dotmarketing/util/ImportUtil.java, especially processRelationships and RelationshipProcessingBuilder; done means the import summary distinguishes both warnings while preserving resolvable relationships and row processing.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, content
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.