特定月の「解決済み」投稿を検索

企業環境でディスコースを注文およびドキュメント管理システムとして運用しています。タグを使用して、注文(トピック)が進行中か完了したかを選択しています。しかし、例えば「Mars」で完了した注文を特定する方法が必要です。

すべての月ごとにタグを使用したいわけではありません(例:tag: March19 など)。

注文の作成や管理を容易にするため、各カテゴリでは表示されるタグ数を制限しています。

完了した際に、注文を納品した人がスレッドの最後に「#march19」というハッシュタグをコメントすれば、そのタグで検索できるという考えが浮かびました。しかし、私のディスコースではハッシュタグが本来の通りに機能していないように思えます。タグシステムの利便性のために、その機能が削除されたのでしょうか?

他にプラグインや方法はありませんか?
アイデアをお待ちしています :slight_smile:

「いいね!」 1

If you have admin privileges you could use the data explorer plugin.

「いいね!」 2

Thanks, good suggestion but I am not so familiar with database inquiries so do not know if I even know where to start with it. Can anyone use / view the results of a request through data explorer in any way? Would be good if everyone could sort out examples delivered things in March easily and not just administrators.

Here is a starting point.

-- [params]
-- int :months_ago = 1

WITH query_period AS
(SELECT date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' AS period_start,
                                                    date_trunc('month', CURRENT_DATE) - INTERVAL ':months_ago months' + INTERVAL '1 month' - INTERVAL '1 second' AS period_end)
select posts.*
from posts
inner join ( 
	select topic_id, value::int accepted_answer_post_id 
	from topic_custom_fields 
	where name = 'accepted_answer_post_id'
	order by name 
) solved_by_post
on posts.id = solved_by_post.accepted_answer_post_id
inner join query_period
on posts.created_at >= query_period.period_start
AND posts.created_at <= query_period.period_end
order by posts.created_at desc 

solved-topics-in-month.dcquery (1).json (1.1 KB)

「いいね!」 2

You could run a cron job at the start of each month to get the results and then create a new topic … ‘Orders Completed in March 2019’ with links to each result in the topic.

「いいね!」 1