Searching for topic visibility id + logs

AI-generated summary

jenmck is seeking a way to log or track when topics are unlisted and by whom. They noted that while the topics table contains a visibility_reason_id, there is no obvious key to interpret it, and standard logs (user_histories, user_actions, Admin > Logs) do not appear to capture these events. NateDhaliwal suggests that the visibility_reason_id values correspond to constants defined in the Discourse frontend code (constants.js) but remains unsure about how to retrieve a history of visibility changes.

Hello,

I’m trying to find information / logs about unlisted topics.

I’ve been looking through the Data Explorer:

  • in topics, there’s visibility_reason_id, but there isn’t a key I can find to know what the id relates to.
  • i’ve looked in user_histories and user_actions, nothing comes up (i tested unlisting a topic and then queried my user histories)

It’s not in the moderation review that I could see, nor is it coming up in Admin > Logs > Logs & Screening.

Is there a way to have a list of all the times topics have been listed or unlisted, and by whom?

Fairly certain it’s this:

But as to times… not too sure about that. I’ll dig around.