-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathautomated_tickets.ini
126 lines (93 loc) · 5.7 KB
/
automated_tickets.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Purpose:
#
# Expose general configuration options so values do not have to be
# hardcoded in the main script.
############################################################
# "toggle" options to broadly enable/disable behavior. Primarily used to
# control the types of output messages used to assist when first configuring
# or testing the script. For example, you might wish to see the output to
# know all is well before enabling the script as part of a cron job and
# then turning off all output
[flags]
############################################################
# Disables sending notifications and any other possibly destructive action
testing_mode = false
# Set to true for verbose output to the current console/terminal as the script
# executes. Useful for troubleshooting.
display_console_debug_messages = false
# Less verbose output. Enabling this provides status details.
display_console_info_messages = false
# Output warning messages which indicate that a desired step was not
# completed as expected, but the issue does not appear to be severe
# enough to stop the script from completing in an "acceptable" manner.
display_console_warning_messages = false
# Output error messages which block proper operation of the script
display_console_error_messages = false
# If enabled, this treats all warnings as failures and exits immediately with
# one or more messages indicating that this option is enabled and what warning
# condition occured
# TODO: Add support for this
# fail_on_warnings = false
# If enabled, events/tasks that are flagged as an intern_task are processed
# like all other matching events. If false, then those events are filtered out
process_intern_events = true
# If enabled, any '{{include(PAGE_NAME_HERE)}}' macro calls found when pulling
# the wiki page contents from the first page will be expanded (macro calls
# replaced by the include pages) so that the final content is self-contained
# with no further direct dependencies on external pages. "Related pages"
# sections are prefectly acceptable, but not commonplace among the include
# pages intended for ticket generation.
expand_include_macros_in_wiki_pages = true
##############################################################################
# Used by the MySQL database connector module
[mysqldb_config]
##############################################################################
# Read-only access to Redmine wiki and event_reminders database tables is sufficient
user = events_ro
# Password for the MySQL database account. Reminder: read-only access
# is sufficient
password = ChangeM3
# MySQL database host. If you use a stunnel or other forwarded connection you
# will likely wish to set this to 127.0.0.1 and override the default port
# for the 'port' setting
host = localhost
# If this script runs on the same box as the MySQL/MariaDB server then you
# probably want to enter 3306 here, otherwise if using stunnel or another
# port forwarding setup you will likely need to enter an alternate port.
port = 3306
# The database which holds event reminder entries.
events_database = event_reminders
# The Redmine database holding the wiki pages which this script will pull
# from in order to generate "automated" tickets with pre-filled content
redmine_database = redmine
# Specific to the upstream MySQL Connector module > 2.0.5. This forces all
# warning conditions to trigger exceptions, which if uncaught will terminate
# the script. In normal operation you shouldn't receive any exceptions, so
# this is enabled by default to help catch configuration or script errors
raise_on_warnings = true
[email]
# These values are used if an event_reminders entry doesn't have a value recorded
# Note: These are helper values that are not yet directly referenced by Python
# code, but instead referenced by the enabled_event_table_entries query in
# this file.
default_from_address = [email protected]
default_to_address = automated-tickets@localhost
##############################################################################
# Used by the MySQL database connector module
[queries]
# Pull wiki page contents from Redmine database
# The wiki_pages.title value is the name of the page as shown in the URL
# The project.identifier value is the project "shortname", shown in the URL
wiki_page_contents = SELECT wiki_contents.text FROM wiki_contents INNER JOIN wiki_pages ON wiki_pages.id = wiki_contents.page_id INNER JOIN wikis ON wikis.id = wiki_pages.wiki_id INNER JOIN projects ON projects.id = wikis.project_id WHERE wiki_pages.title = '{}' AND projects.identifier = '{}'
# The query needed to pull event table entries. As is, this query does not limit
# the returned results by event schedule or whether the flag is set for
# processing "intern" tasks. That is handled programatically by the script
event_table_entries = SELECT IF(email_to_address IS NOT NULL, email_to_address, '${email:default_to_address}') AS email_to_address, IF(email_from_address IS NOT NULL, email_from_address, '${email:default_from_address}') AS email_from_address, email_subject_prefix, redmine_wiki_page_name, redmine_wiki_page_project_shortname, redmine_new_issue_project, redmine_new_issue_category, redmine_new_issue_status, IF(redmine_new_issue_due_after_days IS NOT NULL, CURRENT_DATE() + INTERVAL redmine_new_issue_due_after_days DAY, NULL) AS redmine_new_issue_due_after_days, redmine_new_issue_priority, event_schedule FROM events WHERE enabled = 1
##############################################################################
# FIXME: Come up with a better name. Perhaps have a separate section per
# notification type? If so, then 'email', 'xmpp', ... and this section
# can go away.
[notification_servers]
email_server_ip_or_fqdn = localhost
#email_server_username
#email_server_password