[Task] v1 publishing list: add sort param and expand filter scope
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Context
Surfaced by the Publishing Queue migration spike (#36039). The new Angular Publishing Queue portlet (#36040) needs GET /v1/publishing (com.dotcms.rest.api.v1.publishing.PublishingResource#listPublishingJobs, PublishingResource:187) to support two capabilities the prototype design assumes:
-
Three-state sort on
BundleandStatuscolumns (asc → desc → unsorted). Today the list endpoint returns a fixed ordering and the helper doesn't parse asortparameter, so the FE either has to sort client-side after fetching (which breaks pagination correctness) or accept the default order. -
Extended filter scope for the global top-bar search ("Search bundles, content, or environments"). Today the
filterquery param matchesbundle_idandbundle_namepartial substring only. The design surface filters across bundle name, bundle id, every item name + item type, every environment name, and every endpoint name.
Proposed change
Add to GET /v1/publishing:
sortquery param — comma-separated list, e.g.sort=created:desc,status:asc. Allowed keys:bundle_id,bundle_name,status,created,modified. Default:created:descto preserve current behavior.- Extend
filterto perform a SQLORsubstring match across the new columns (item_name,item_type,environment_name,endpoint_name) in addition to the existing two. Behind a feature flagdotcms.publishing.filter.extended=true(default on for new installs, off by default for upgrades) so legacy clients keep their current behavior.
Acceptance criteria
GET /v1/publishing?sort=created:descreturns rows ordered bycreateddescendingGET /v1/publishing?sort=status:asc,created:descapplies both keys in order- Invalid sort key → 400 with
{ message } GET /v1/publishing?filter=acmematches any bundle whose name, id, asset name/type, env name, or endpoint name containsacme(case-insensitive)- OpenAPI updated with the new params
- Existing integration tests pass; new tests cover sort + extended filter behavior
Source links
- Spike audit: #36039 (see the API audit comment)
- FE consumer: #36040
- Epic: #34734
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at com.dotcms.rest.api.v1.publishing.PublishingResource#listPublishingJobs, identified as PublishingResource:187, and trace how the sort and filter query parameters reach the data query. Review the OpenAPI definition and existing integration tests, then verify the documented sort ordering, invalid-key response, extended case-insensitive filtering, feature-flag behavior, and new test coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100