We use Discourse as a knowledge & feedback sharing forum for our employees, partners, and customers. We’ve communicated to everyone that they should add a docrequest tag to a Topic or Post if a community conversation uncovers a topic for which we need to add or improve our documentation; our product team, in turn, has set their watching preferences to be notified any time the docrequest tag is used.
What we are finding is that the tag neither populates in the Search bar nor in tracking notifications if the tag is used in a reply post - it only ever works if it’s added to the original Topic. I, as the community moderator and admin, then need to monitor every post for the tag and then manually add the tag to the original topic. This obviously does not scale.
Am I doing something incorrectly or is there a setting I can change?
You can reference a tag in a post, but only a topic can actually be tagged as such.
However, if you have the data explorer plugin you could use a query something like this to pull up a list of ones where the tag has been linked in a post:
-- string :hashtag
-- date :start_date
-- date :end_date
WITH target_posts AS (
p.id AS post_id,
FROM posts p
JOIN topics t ON p.topic_id = t.id
JOIN users u ON u.id = p.user_id
WHERE t.deleted_at IS NULL
AND t.archetype = 'regular'
AND p.deleted_at IS NULL
AND p.post_type = 1
AND p.created_at::date BETWEEN :start_date AND :end_date
AND p.post_number <> 1
FROM target_posts tp
LEFT JOIN post_search_data psd ON psd.post_id = tp.post_id
WHERE psd.search_data @@ TO_TSQUERY(:hashtag)
ORDER BY tp.created_at DESC
Thank you. Without an easy button, that will have to do. I’ve also gone in and added Watched Words to auto-create the tag if needed, but again, I think that only works for Topics. It would be great if there was a way to add tags to Posts - perhaps most folks would find that a bit much, but if it was a setting that could be toggled on, I know it would sure help at least our scenario. Anyway, thanks for the info, all!