J’utilise Discourse dans un environnement d’entreprise comme système de commande et de documentation. J’utilise des balises pour déterminer si une commande (sujet) est en cours ou terminée. Cependant, j’aurais besoin d’un moyen d’identifier les commandes terminées en mars, par exemple.
Je ne souhaite pas utiliser une balise pour chaque mois, par exemple : balise mars19.
J’ai un nombre limité de balises visibles dans les catégories respectives pour faciliter la création et la maintenance des commandes.
J’ai pensé à utiliser des hashtags : lorsqu’une commande est terminée, la personne qui l’a livrée pourrait commenter #mars19 à la fin du fil, ce qui permettrait de rechercher par cette balise. Cependant, il me semble que les hashtags ne fonctionnent pas comme ils devraient sur mon instance Discourse ; cette fonctionnalité a-t-elle été supprimée au profit du système de balises ?
Existe-t-il d’autres plugins ou méthodes pour réaliser cela ?
J’ai besoin d’idées
csmu
(Keith John Hutchison - Ceiteach Seán Mac Úistin)
2
If you have admin privileges you could use the data explorer plugin.
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.
csmu
(Keith John Hutchison - Ceiteach Seán Mac Úistin)
4
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
csmu
(Keith John Hutchison - Ceiteach Seán Mac Úistin)
5
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.