# 修复：当为同一目标重用已标记的可审核项时，防止已批准且排队的可审核项复活

**URL:** <https://meta.discourse.org/t/fix-prevent-resurrection-of-approved-queued-reviewables-when-reusing-flagged-reviewables-for-the-same-target/407852>\
**Category:** Bug\
**Tags:** review-queue\
**Created:** [2026年七月17日 02:34 UTC](https://meta.discourse.org/t/fix-prevent-resurrection-of-approved-queued-reviewables-when-reusing-flagged-reviewables-for-the-same-target/407852 "2026-07-17T02:34:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![small-lovely-cat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/small-lovely-cat/32/579066_2.png) [@small-lovely-cat](https://meta.discourse.org/u/small-lovely-cat)\
**Post date:** [2026年七月17日 02:34 UTC](https://meta.discourse.org/t/fix-prevent-resurrection-of-approved-queued-reviewables-when-reusing-flagged-reviewables-for-the-same-target/407852/1 "2026-07-17T02:34:15Z")

</div>

对于以下步骤：

1. 设置一个监控词。
2. 用户触发了监控词，主题进入待审核队列。
3. 管理员批准了该主题。
4. 用户举报了该主题。

此时，原本状态为“已批准”的“批准此主题”审核项会重新变为“待处理”状态，队列中会出现两个审核项（一个是用于批准此主题的，其批准或拒绝已无实际意义；另一个是用于处理举报的），这显然不符合预期。

此提交添加了逻辑，防止状态被改回，仅保留举报相关的审核项，并补充了相应的测试用例。

> <https://github.com/discourse/discourse/pull/41790>
>
> For these steps:
> 
> 1. Set a watched word.
> 2. A user triggered watched word, an…d the topic fall into the reviewables.
> 3. A staff approved the topic.
> 4. The topic is flagged by a user.
> 
> Then the original reviewables of "Approving this topic" will change its status from "Approved" back to "Pending", and there will be two reviewables in the queue (one for approving this topic, which approve/reject won't make any difference, and another for dealing with the flag), which shouldn't be that case.
> 
> This commit add logic to prevent that from being changed back, keeping only the flagged reviewables, and some specs are also added to it.

---

_[View the full topic](https://meta.discourse.org/t/fix-prevent-resurrection-of-approved-queued-reviewables-when-reusing-flagged-reviewables-for-the-same-target/407852)._
