When moving a solved topic to a category that disallows solutions, remove solved

AI-generated summary

The discussion addresses a bug where moving a solved topic to a category that disallows solutions failed to remove the “solved” status. codinghorror initially reported the issue, noting that topics moved out of categories with solutions retained their solved markers. sam agreed to the cleanup, and bekicot submitted a PR adding a plugin hook to handle category changes. tgxworld suggested using a model callback instead of a new event trigger. fhe and nildarar confirmed the issue persisted, explaining that admins could not uncheck the solution after moving the topic to an incompatible category. lindsey initially claimed a fix was in place, but Moin clarified that the previous fix only addressed moving individual posts, not entire topics. lindsey acknowledged the misunderstanding and lindsey committed to fixing the topic-level issue. Finally, lindsey confirmed the behavior was updated: when a solved topic is moved to a category without solution support, the accepted solution is automatically removed, and admins receive a notification before the move is completed.

I’ve seen this too when moving topics out of a category where solved was set, any way to fix this @sam?

  • When moving a topic out of a category with solutions, remove solved stuff

  • When moving a topic into a category with solution, make solved possible

2개의 좋아요

Agree, we should get this cleaned up, for now pr-welcome

4개의 좋아요

Added Trigger DiscourseEvent when topic category is changed by bekicot · Pull Request #4785 · discourse/discourse · GitHub, so that plugin can hook into :topic_category_changed. I think it is required in order to fix this issue.

5개의 좋아요

Thanks for the PR @bekicot :thumbsup:

I was just curious but is it possible to avoid adding a DiscourseEvent trigger and just add a model callback which checks when the category_id has been changed?

2개의 좋아요

Seems like this is still happening.

A topic marked as solution which is moved out of a category with solutions remains marked as solution (and cannot be unchecked as such)

1개의 좋아요

답변 중 하나가 정답으로 잘못 표시된 경우, 관리자는 카테고리가 잘못되었음을 확인하고 해당 주제를 다른 카테고리로 이동시킵니다. 그러나 새로운 카테고리에서 이 기능이 비활성화되어 있어도, 표시된 답변은 여전히 정답으로 표시됩니다.
이러한 경우, 관리자는 표시된 답변을 취소할 수 없습니다. 이 기능이 활성화된 카테고리로 카테고리를 변경해야 합니다. 정답을 취소한 후 다시 카테고리를 변경해야 합니다.

관리자가 모든 카테고리(이 기능이 비활성화된 카테고리 포함)에서 정답을 취소할 수 있다면 조금 더 쉬울 것입니다.

해결된 답변이 주제에서 이동되면 해당 주제가 미해결 상태로 복귀하도록 하여 이 문제를 해결했습니다.

해결 답변을 이동하는 사용자는 이동 작업을 완료하기 전에 해당 조치의 영향을 통보받습니다:

4개의 좋아요

저에게는 Carelessly splitting a solved post to a new topic breaks things 의 문제를 수정하는 것처럼 보입니다.

OP에서 설명한 문제, 즉 해결책 기능이 비활성화된 다른 카테고리로 전체 토픽이 이동되는 문제가 아니라 몇 개의 게시글만 다른 토픽으로 이동하는 것에 관한 것이기 때문에, 이 수정이 OP의 문제를 해결하는 것 같지는 않습니다. 해결된 상태인 `personal_messages:username` search filter doesn't work 을 해결책이 허용되지 않는 Contribute > Feature 로 이동하면 해결책이 제거되지 않고 경고도 표시되지 않습니다.

이 문제는 다음과 같습니다:

하지만 문제의 범위가 더 넓어 보이므로 이 이슈를 열어두겠습니다.

음, 아직도 이해가 안 돼요. 방금 제가 시도한 게 바로 그거 아닌가요?

해결책으로 표시된 주제

해결된 것으로 표시된 이 주제를 선택했습니다 `personal_messages:username` search filter doesn't work

해결책이 있는 카테고리에서 이동된 경우

해결책 기능이 비활성화된 Contribute > Feature 로 이동했습니다

여전히 해결책으로 표시됨 (해제할 수 없음)

그런데도 여전히 해결된 것으로 표시되어 있었습니다. 이 수정이 이 과정에서 무엇을 변경한 건가요?

2개의 좋아요

죄송합니다. 이제 말씀하시는 내용을 이해했습니다. 저는 이 내용을 카테고리에서 이동된 게시물이 해결책으로 표시된 것으로 잘못 읽고 있었습니다.

하지만 이 문제는 수정 대기열에 추가할 생각입니다. 해결된 게시물에 대해 우리가 했던 작업에 대한 작은 개선 사항이라고 생각하기 때문입니다.

3개의 좋아요

해당 동작을 업데이트하여, 해결된 주제가 솔루션을 지원하지 않는 카테고리로 이동할 경우, 승인된 솔루션이 주제에서 제거되도록 했습니다. 관리자가 이동을 완료하기 전에 이를 알림으로 안내합니다:

5개의 좋아요

이 주제는 2일 후 자동으로 닫혔습니다. 더 이상 새 답변을 작성할 수 없습니다.