Show correct alert when project's group is archived
What does this MR do and why?
Replace direct archived? checks with self_or_ancestors_archived? method across work item, issue, and merge request serializers to properly handle cases where projects belong to archived groups. This ensures consistent behavior when determining if a resource should be treated as archived based on its project or parent group status.
References
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Enable the feature flag in Rails console:
Feature.enable(:archive_group). - Create a new group, then a new project under it and then a new issue and an MR under it.
- Then go the group settings -> Advanced -> Archive.
- The correct alter should be present as shown above on the issue and the MR page.
- Go to the master branch, and you'll see the old wrong alert as shown in the Before screenshot above.
- Also, run the following in https://gdk.test:3000/-/graphql-explorer and
archivedshould betrue:
{
group(fullPath: "<archived-group-path>") {
workItems(first: 1) {
nodes {
archived
}
}
}
}
Output:
{
"data": {
"group": {
"workItems": {
"nodes": [
{
"archived": true
}
]
}
}
},
"correlationId": "01K2ES7B7K0XEG9TSNCX15HW8A"
}
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #551342 (closed)

