Skip to content

[TASK] Content Drive: filter drive search by workflow (scheme with optional step) #35470

Closed

Description

@zJaaal

Problem Statement

The content drive search endpoint (POST /api/v1/drive/search, ContentDriveResource.search()) exposes no workflow filter. The content-drive chip-filter UI (#35880) lets the user pick multiple workflow schemes, each optionally pinned to one step, and needs the search to honor that selection.

Approach

DB-first — filter in the SQL layer (BrowserAPIImpl.selectQuery), keeping the drive's DB-first hybrid intact (no forced Elasticsearch path). Added to the shared SQL builder, so it covers both drive/search and /v1/browser; only the drive REST form is wired.

Request contract (FE → BE)

A single optional workflow field — a list of { scheme, step? }. Each entry is one selected scheme, optionally pinned to one step (step omitted = "all steps of that scheme").

"workflow": [
  { "scheme": "d61a59e1-…", "step": "dc3c9cd0-…" },
  { "scheme": "2a4e1d2e-…" }
]

Semantics

  • Scheme-only entry → content whose content type is assigned that scheme (workflow_scheme_x_structure), so imported / push-published / never-actioned content (no workflow_task) still appears under its scheme.
  • Step-pinned entry → content whose current task is at that step (workflow_task.status).
  • Entries combine with OR. Task-less content matches at the scheme level but not a specific step.
  • Trade-off: a multi-scheme content type matches under every assigned scheme regardless of its current task — consistent with "content governed by this workflow".

Acceptance Criteria

  • DotContentDriveSearchRequest + the Java form accept the optional workflow: [{ scheme, step? }] field.
  • [{scheme:A}] → all content of A-assigned types, including imported/never-actioned content with no task.
  • [{scheme:A, step:X}] → content whose current task is at step X.
  • [{scheme:A}, {scheme:C, step:Y}] → (A-assigned types) ∪ (current task at Y).
  • Multi-language filtering is per-language.
  • Empty/omitted workflow → no regression.
  • Folders suppressed when a workflow filter is active.

Tests

  • Integration (mirror ContentDriveHelperContentletAPIComparisonTest / BrowserAPITest): cover the AC above — especially an imported/never-actioned contentlet appearing under a scheme filter, the OR case, multi-language, and folder suppression.
  • Postman: add workflow array cases to ContentDriveResource.postman_collection.json.

Out of Scope

  • Filtering by workflow assignee or action.

Activity

  1. added theissue type on Apr 27, 2026
  2. changed the title [-]feat(content-drive): filter search by multiple workflow schemes and steps[/-] [+][TASK] Content Drive: filter search by multiple workflow schemes and steps[/+] on Apr 27, 2026
  3. changed the title [-][TASK] Content Drive: filter search by multiple workflow schemes and steps[/-] [+][TASK] Content Drive: filter search by workflow schemes and steps[/+] on Apr 27, 2026
  4. moved this from New to Next Sprint in dotCMS - Product Planningon Apr 27, 2026
  5. assigned and unassigned on Jun 1, 2026
  6. changed the title [-][TASK] Content Drive: filter search by workflow schemes and steps[/-] [+][TASK] Content Drive: filter drive search by workflow (scheme with optional step)[/+] on Jun 2, 2026
  7. zJaaal commented on Jun 3, 2026

    @zJaaal
    MemberAuthor

    Consolidated into #35880 and delivered in the same PR (#35906) as the frontend. The backend design from this ticket has been folded into #35880 (see its comment), and the contract/semantics described here match what shipped. Closing in favor of #35880 / #35906.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions