ابحث عن المنشورات "المحلولّة" في شهر محدد

أدير نظام Discourse في بيئة مؤسسية كنظام للطلبات والتوثيق. أستخدم الوسوم لتحديد ما إذا كانت الطلبية (الموضوع) جارية أو مكتملة. لكنني أحتاج إلى طريقة لتحديد الطلبات المكتملة في شهر مارس، على سبيل المثال.
لا أرغب في استخدام وسم لكل شهر، مثل: March19.

لدي عدد محدود من الوسوم الظاهرة في الفئات المعنية لتسهيل إنشاء/صيانة الطلبات.

خطر ببالي استخدام وسوم الهاشتاغ، بحيث عندما تُكتمل الطلبية، يقوم الشخص الذي سلمها بالتعليق بـ #march19 في نهاية الموضوع، مما يسمح بالبحث عبر هذا الوسم. لكن ألا يبدو أن وسوم الهاشتاغ لا تعمل كما ينبغي في نظام Discourse الخاص بي؟ هل قد تم إزالة هذه الوظيفة لصالح نظام الوسوم؟

هل توجد إضافات أخرى أو طرق للقيام بذلك؟
أحتاج إلى أفكار :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)