Commit Graph

8 Commits

Author SHA1 Message Date
Martin Brennan da1c99ec2d
FEATURE: Add script to post report results in a topic regularly (#328)
This script is similar to the existing one that schedules
report results to to be sent to a PM on a regular basis,
but instead takes a topic ID and posts to that. This way
people can have report results sent to a public topic regularly
too and not have to deal with PM recipients and so on.
2024-10-10 16:09:09 +10:00
Linca d3064661cb
DEV: Add missing `freeze_time` in report_generator_spec (#327)
We are missing two `freeze_time`s in the spec, which makes these two
tests flaky tests.

ref: t/138542
2024-09-18 09:09:07 +08:00
锦心 cbae98f6ed
FEATURE: Allows CSV file result to be attached in automated PMs (#318)
This commit adds an optional setting that allows to attach query results
in CSV format as a file to PMs sent by Data Explorer's automation
scripts.

meta topic: https://meta.discourse.org/t/turn-data-explorer-query-results-into-csv-to-attach-to-discourse-automated-emails/267529

Co-authored-by: Drenmi <drenmi@gmail.com>
2024-08-27 11:41:12 +08:00
David Battersby cde34fb316
FIX: send single report PM to groups (#284)
The main change here is that we now send a single PM to a group rather than individual PMs to each group member.

This change also adds email recipients correctly as target_emails since support was added within Discourse Automation.
2024-03-27 17:40:26 +08:00
Loïc Guitaut abe51c2aba
DEV: Fix new Rubocop offenses (#282) 2024-02-29 18:15:57 +01:00
Natalie Tay 66c54a35cd
FIX: Continue to send the PM to others when there is a group or user that does not exist (#274)
Don't error out  when there is a group or user that does not exist
and also allow admins to be sent
2024-01-03 14:05:03 +08:00
David Battersby e4f8d3924a
FIX: update report url to work with subfolder installs (#255)
This change includes the Discourse base url to allow for subfolder installs, it will also fix another potential issue where reports are sent via email (since we use the email_group_user component) that would require the base_url to know which domain to point to.
2023-07-31 10:14:12 +08:00
David Battersby 705753216c
FEATURE: Allow data explorer query result to be sent as recurring PM (#233)
This feature enables admins to create reports automatically based on a recurring schedule.

It introduces a new automation script that includes the new email_group_user field added to discourse-automation, along with a query_id and query_params to pass in parameters to the existing data explorer query.

The output of the report will be sent via pm (as a markdown table) to the recipients entered within the automation script.

The automation (supports individual users, email addresses and groups).
2023-03-24 16:38:42 +08:00