FEATURE: Re-add the assigned-topics-report query
The assigned-topics-report query was added in5f3bcab2
but was mistakenly removed byc8ca1e14
. I've just re-added it.
This commit is contained in:
parent
3b47c9a597
commit
b83eefd9b8
|
@ -69,8 +69,13 @@ class Queries
|
||||||
"name": "List of topics a user is watching/tracking/muted",
|
"name": "List of topics a user is watching/tracking/muted",
|
||||||
"description": "The query requires a ‘notification_level’ parameter. Use 0 for muted, 1 for regular, 2 for tracked and 3 for watched topics."
|
"description": "The query requires a ‘notification_level’ parameter. Use 0 for muted, 1 for regular, 2 for tracked and 3 for watched topics."
|
||||||
},
|
},
|
||||||
"group-members-reply-count": {
|
"assigned-topics-report": {
|
||||||
"id": -13,
|
"id": -13,
|
||||||
|
"name": "List of assigned topics by user",
|
||||||
|
"description": "This report requires the assign plugin, it will find all assigned topics"
|
||||||
|
},
|
||||||
|
"group-members-reply-count": {
|
||||||
|
"id": -14,
|
||||||
"name": "Group Members Reply Count",
|
"name": "Group Members Reply Count",
|
||||||
"description": "Number of replies by members of a group over a given time period. Requires 'group_name', 'start_date', and 'end_date' parameters. Dates need to be in the form 'yyyy-mm-dd'. Accepts an 'include_pms' parameter."
|
"description": "Number of replies by members of a group over a given time period. Requires 'group_name', 'start_date', and 'end_date' parameters. Dates need to be in the form 'yyyy-mm-dd'. Accepts an 'include_pms' parameter."
|
||||||
}
|
}
|
||||||
|
@ -378,6 +383,16 @@ class Queries
|
||||||
ORDER BY tu.last_visited_at DESC
|
ORDER BY tu.last_visited_at DESC
|
||||||
SQL
|
SQL
|
||||||
|
|
||||||
|
queries["assigned-topics-report"]["sql"] = <<~SQL
|
||||||
|
SELECT value::int user_id, topic_id
|
||||||
|
FROM topic_custom_fields tf
|
||||||
|
JOIN topics t on t.id = topic_id
|
||||||
|
JOIN users u on u.id = value::int
|
||||||
|
WHERE tf.name = 'assigned_to_id'
|
||||||
|
AND t.deleted_at IS NULL
|
||||||
|
ORDER BY username, topic_id
|
||||||
|
SQL
|
||||||
|
|
||||||
queries["group-members-reply-count"]["sql"] = <<~SQL
|
queries["group-members-reply-count"]["sql"] = <<~SQL
|
||||||
-- [params]
|
-- [params]
|
||||||
-- date :start_date
|
-- date :start_date
|
||||||
|
|
Loading…
Reference in New Issue