enterprise/lifecycle: remove one review per object limitation (#21046)

* enterprise/lifecycle: allow multiple rules to apply to a single object (and thus, multiple concurrent reviews)

* enterprise/lifecyle: add missing migration to allow multiple lifecycle rules per object, add tests, update documentation

* enterprise/lifecycle: add a bit of padding to individual review iterations on Review tab for better visual separation

* enterprise/lifecycle: remove validation preventing the creation of multiple lifecycle rules for one object type

* enterprise/lifecycle: change the approach to querying the list of reviews with user_is_reviewer annotation to prevent duplicate rows

* enterprise/lifecycle: add custom per-type logic to get object name for use in a notification to prevent texts like "Review is due for Group Group X"

* enterprise/lifecycle: updated wording on lifecycle rule form and preview banner padding

* enterprise/lifecycle: remove task list from lifecycle rules and switch to using per-rule schedules

* enterprise/lifecycle: add a title to the lifecycle tab

* Revert "enterprise/lifecycle: remove task list from lifecycle rules and switch to using per-rule schedules"

This reverts commit 8a060015b693f65f651a71bdb0c47092d3463af1.

* enterprise/lifecycle: remove task list from the lifecycle rule list page and attach the tasks to the schedule

* enterprise/lifecycle: add proper caption when there are no reviews for an object

* enterprise/lifecycle: attach individual apply_lifecycle_rule tasks to the schedule when launched from apply_lifecycle_rules

* enterprise/lifecycle: update generated API clients

* enterprise/lifecycle: update wording

* enterprise/lifecycle: fix ts issues after rebase

* Update website/docs/sys-mgmt/object-lifecycle-management.md

Co-authored-by: Dominic R <dominic@sdko.org>
Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>

* enterprise/lifecycle: remove fmall code artifact

---------

Signed-off-by: Alexander Tereshkin <96586+atereshkin@users.noreply.github.com>
Co-authored-by: Dominic R <dominic@sdko.org>
This commit is contained in:
Alexander Tereshkin
2026-04-30 22:11:07 +03:00
committed by GitHub
parent 699360064e
commit 8963d29ab4
19 changed files with 726 additions and 436 deletions
+44 -18
View File
@@ -9132,7 +9132,7 @@ paths:
$ref: '#/components/responses/GenericErrorResponse'
/lifecycle/iterations/latest/{content_type}/{object_id}/:
get:
operationId: lifecycle_iterations_latest_retrieve
operationId: lifecycle_iterations_list_latest
description: |-
Mixin to validate that a valid enterprise license
exists before allowing to save the object
@@ -9149,6 +9149,12 @@ paths:
type: string
pattern: ^[^/]+$
required: true
- $ref: '#/components/parameters/QueryPaginationOrdering'
- $ref: '#/components/parameters/QuerySearch'
- in: query
name: user_is_reviewer
schema:
type: boolean
tags:
- lifecycle
security:
@@ -9158,7 +9164,9 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/LifecycleIteration'
type: array
items:
$ref: '#/components/schemas/LifecycleIteration'
description: ''
'400':
$ref: '#/components/responses/ValidationErrorResponse'
@@ -42426,35 +42434,24 @@ components:
items:
$ref: '#/components/schemas/Review'
readOnly: true
rule:
allOf:
- $ref: '#/components/schemas/RelatedRule'
readOnly: true
user_can_review:
type: boolean
readOnly: true
reviewer_groups:
type: array
items:
$ref: '#/components/schemas/ReviewerGroup'
readOnly: true
min_reviewers:
type: integer
readOnly: true
reviewers:
type: array
items:
$ref: '#/components/schemas/ReviewerUser'
readOnly: true
required:
- content_type
- grace_period_end
- id
- min_reviewers
- next_review_date
- object_admin_url
- object_id
- object_verbose
- opened_on
- reviewer_groups
- reviewers
- reviews
- rule
- state
- user_can_review
LifecycleIterationRequest:
@@ -53285,6 +53282,35 @@ components:
- group_uuid
- name
- pk
RelatedRule:
type: object
description: |-
Mixin to validate that a valid enterprise license
exists before allowing to save the object
properties:
id:
type: string
format: uuid
name:
type: string
reviewer_groups:
type: array
items:
$ref: '#/components/schemas/ReviewerGroup'
readOnly: true
min_reviewers:
type: integer
readOnly: true
reviewers:
type: array
items:
$ref: '#/components/schemas/ReviewerUser'
readOnly: true
required:
- min_reviewers
- name
- reviewer_groups
- reviewers
Reputation:
type: object
description: Reputation Serializer