Skip to content

34323 implement api to post bundle for publishing#34481

Open
hassandotcms wants to merge 5 commits intomainfrom
34323-implement-post-bundle-for-publishing
Open

34323 implement api to post bundle for publishing#34481
hassandotcms wants to merge 5 commits intomainfrom
34323-implement-post-bundle-for-publishing

Conversation

@hassandotcms
Copy link
Contributor

@hassandotcms hassandotcms commented Feb 3, 2026

Proposed Changes

  • Add POST /v1/publishing/push/{bundleId} endpoint to queue bundles for publishing
  • Support publish, expire, and publishexpire operations with ISO 8601 dates
  • Validate environment permissions and return actual processed environments
  • Integration tests

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Additional Info

** any additional useful context or info **

Screenshots

Original Updated
** original screenshot ** ** updated screenshot **

This PR fixes: #34323

…dpoint

- Add PushBundleForm: request body for push bundle operation
  - operation (publish/expire/publishexpire)
  - publishDate, expireDate (ISO 8601 format)
  - environments (list of environment IDs)
  - filterKey
- Add AbstractPushBundleResultView: @Value.Immutable response DTO
- Add ResponseEntityPushBundleResultView: typed response wrapper
- Add parseISO8601Date(): parse ISO 8601 dates with timezone offset
- Add validatePushBundleForm(): validate required fields and operation type
- Add validateEnvironmentPermissions(): check user permissions on environments
- Add PermissionAPI dependency to PublishingJobsHelper
…} endpoint

Add endpoint to push existing bundles to environments for publishing.

Supports three operations:
- publish: schedule content for publishing
- expire: schedule content for unpublishing
- publishexpire: publish now with scheduled expiration

Features:
- ISO 8601 date format with timezone offset
- Environment permission validation
- Filter lookup with default fallback (matches existing UI behavior)
- Returns actual valid environment IDs (not echoed request)
Add 18 test cases covering:
- Success cases: publish, expire, publishexpire operations
- Validation: missing/invalid operation, dates, environments, filterKey
- Edge cases: case-insensitive operations, multiple environments
- Error cases: bundle not found, environment not found, invalid date format
- Default filter fallback behavior
- PushBundleForm: extend Validated, move validation to checkValid()
- PublishingResource: add @RequestBody annotation for Swagger docs
- PublishingResource: call form.checkValid() instead of helper
- PublishingJobsHelper: remove validatePushBundleForm (moved to form)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[TASK] Implement POST /v1/publishing/push/{bundleId} - Queue bundle for publishing

1 participant