-
Notifications
You must be signed in to change notification settings - Fork 36
/
ati.yaml
411 lines (359 loc) · 12.8 KB
/
ati.yaml
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
dataset_type: ati
target_dataset: ati
title: ATI Summaries
notes: Access, upload and modify the monthly ATI Summaries and ATI Nothing to Report for your organization
template_version: 3
template_updated: 2021-04-19
portal_type: info
collection: ati
resources:
- title: ATI Summaries
resource_name: ati
published_resource_id: 19383ca2-b01a-487d-88f7-e1ffbc7d39c2
create_form: true
edit_form: true
fields:
- datastore_id: year
label:
en: Year
fr: Année
description:
en: This field must be populated with the four-digit calendar year that the request was closed.
fr: Ce champ doit être complété avec l’année civile à quatre chiffres durant laquelle la demande a été complétée.
validation:
en: Must be not be in the future or before 2011
fr: Ne peux pas être dans le futur ni avant 2011
datastore_type: year
form_attrs:
size: 10
form_required: true
excel_required: true
excel_column_width: 13
excel_error_formula: 'OR({default_formula},{cell}>YEAR(TODAY()),{cell}<2011)'
- datastore_id: month
label:
en: Month (1-12)
fr: Mois (1-12)
description:
en: This field must be populated with a numerical representation of the month during which the request was closed.
fr: Ce champ doit être complété avec la représentation numérique du mois durant lequel la demande a été complétée.
validation:
en: Must be in the range of 1-12 (representing January-December).
fr: Doit être dans la gamme de 1-12 (représente janvier-décembre)
datastore_type: month
form_attrs:
size: 5
form_required: true
excel_required: true
excel_column_width: 18
excel_error_formula: 'OR({default_formula},{cell}<1,{cell}>12)'
solr_month_names: true
- datastore_id: request_number
label:
en: Request Number
fr: Numero de la demande
description:
en: Your institution’s request file number of the completed Access to Information request.
fr: Numéro de dossier de demande de votre institution de la demande d’accès à l’information complétée.
datastore_type: text
excel_column_width: 38
form_required: true
excel_required: true
- datastore_id: summary_en
label:
en: English Summary
fr: Sommaire de la demande en anglais
description:
en: A descriptive summary of the completed Access to Information request in English.
fr: Un résumé descriptif de la demande d’accès à l’information en anglais.
datastore_type: text
form_snippet: scheming/form_snippets/textarea.html
form_attrs:
style: "width: 100%; display: block"
form_required: true
excel_required: true
excel_column_width: 41
- datastore_id: summary_fr
label:
en: French Summary
fr: Sommaire de la demande en français
description:
en: A descriptive summary of the completed Access to Information request in French.
fr: Un résumé descriptif de la demande d’accès à l’information en français.
datastore_type: text
form_snippet: scheming/form_snippets/textarea.html
form_attrs:
style: "width: 100%; display: block"
form_required: true
excel_required: true
excel_column_width: 41
- datastore_id: disposition
label:
en: Disposition
fr: Disposition
description:
en: The response disposition of the completed Access to Information request
fr: La disposition de la réponse de la demande d’accès à l’information complétée.
datastore_type: text
form_required: true
excel_required: true
excel_column_width: 39
excel_full_text_choices: true
choices:
DA:
en: All disclosed
fr: Communication totale
DP:
en: Disclosed in part
fr: Communication partielle
EX:
en: All exempted
fr: Exception totale
EC:
en: All excluded
fr: Exclusion totale
NE:
en: No records exist
fr: Aucun document n’existe
- datastore_id: pages
label:
en: Number of Pages
fr: Nombre de pages
description:
en: The number of pages released in response to the completed Access to Information request. If no records were released, enter a value of “0”.
fr: Le nombre de pages publiées en réponse à la demande d’accès à l’information. Si aucun enregistrement n’a été publié, entrez la valeur « 0 ».
validation:
en: This value must not be negative
fr: Cette valeur ne doit pas être négatif
datastore_type: int
form_required: true
excel_required: true
form_attrs:
size: 10
excel_column_width: 34
excel_error_formula: 'OR({default_formula},{cell}<0)'
- datastore_id: comments_en
label:
en: Comments English
fr: Commentaires en anglais
description:
en: This field may be populated with additional or contextual comments in English.
fr: Ce champ peut être rempli avec des commentaires supplémentaires ou contextuels en anglais.
datastore_type: text
form_snippet: scheming/form_snippets/textarea.html
form_attrs:
style: "width: 100%; display: block"
excel_column_width: 41
excel_required_formula: NOT(ISBLANK({comments_fr}))
- datastore_id: comments_fr
label:
en: Comments French
fr: Commentaires en français
description:
en: This field may be populated with additional or contextual comments in French.
fr: Ce champ peut être rempli avec des commentaires supplémentaires ou contextuels en français.
datastore_type: text
form_snippet: scheming/form_snippets/textarea.html
form_attrs:
style: "width: 100%; display: block"
excel_column_width: 41
excel_required_formula: NOT(ISBLANK({comments_en}))
- datastore_id: record_created
label: Record Creation Time
import_template_include: false
visible_to_public: false
datastore_type: timestamp
preview_class: bg-info
- datastore_id: record_modified
label: Last Record Modification Time
import_template_include: false
visible_to_public: false
datastore_type: timestamp
preview_class: bg-info
- datastore_id: user_modified
label: User Last Modified Record
import_template_include: false
visible_to_public: false
datastore_type: text
preview_class: bg-info
solr_static_fields:
report_type_en: ATI Summaries
report_type_fr: Accès à l’information sommaires complétés
solr_legacy_ati_ids: true
solr_org_fields:
- ati_email
datastore_primary_key: request_number
datastore_indexes: ""
default_preview_sort: year desc, month desc
excel_example_height: 32
triggers:
- ati_trigger: |
DECLARE
errors text[][] := '{{}}';
BEGIN
IF NEW.request_number LIKE '%,%' THEN
errors := errors || ARRAY[['request_number', {request_number_error}]];
END IF;
errors := errors || required_error(NEW.year, 'year');
IF NEW.year < 2011 OR NEW.year > date_part('year', CURRENT_DATE) THEN
errors := errors || ARRAY[['year', {year_error}]];
END IF;
errors := errors || required_error(NEW.month, 'month');
IF NEW.month < 1 OR NEW.month > 12 THEN
errors := errors || ARRAY[['month', {month_error}]];
END IF;
IF NEW.pages < 0 THEN
errors := errors || ARRAY[['pages', {pages_error}]];
END IF;
errors := errors || required_error(NEW.request_number, 'request_number');
errors := errors || required_error(NEW.summary_en, 'summary_en');
errors := errors || required_error(NEW.summary_fr, 'summary_fr');
errors := errors || required_error(NEW.pages, 'pages');
errors := errors || required_error(NEW.disposition, 'disposition');
errors := errors || choice_error(NEW.disposition, {disposition}, 'disposition');
errors := errors || both_languages_error(NEW.comments_en, 'comments_en', NEW.comments_fr, 'comments_fr');
IF errors = '{{}}' THEN
RETURN NEW;
END IF;
RAISE EXCEPTION E'TAB-DELIMITED\t%', array_to_string(errors, E'\t');
END;
- update_record_modified_created_trigger
trigger_strings: # yaml | not supported
year_error: Please enter a valid year
month_error: Please enter a month number from 1-12
pages_error: This value must not be negative
request_number_error: Comma is not allowed in Request Number field
examples:
record:
year: 2020
month: 10
request_number: A-2020-00516
summary_fr: Copies des rapports de vérification et d’évaluation
du système de gestion de la sécurité
summary_en: Copies of the Safety Management System Audit and
Evaluation Reports
disposition: DP
pages: 779
comments_en: The disclosure package also included audio recordings
comments_fr: Le dossier de divulgation comprend en plus des enregistrements audio
filters:
month: 10
year: 2020
filter_one:
request_number: A-2020-00516
sort: year desc, month desc
# copy UMD Number field into output CSV for external ATI system
csv_org_extras:
- umd_number
- title: ATI Nothing to Report
resource_name: ati-nil
published_resource_id: 5a1386a5-ba69-4725-8338-2f26004d7382
create_form: true
edit_form: false #edit not possible for nil reports since only stored data is primary key
fields:
- datastore_id: year
label:
en: Year
fr: Année
description:
en: Four-digit calendar year of the month for which you are reporting no summaries to publish.
fr: Année civile a quatre chiffres du mois pour lequel vous ne signalez aucun résumé à publier.
validation:
en: Must be not be in the future or before 2011
fr: Ne peux pas être dans le futur ni avant 2011
datastore_type: year
form_attrs:
size: 10
form_required: true
excel_required: true
excel_column_width: 13
excel_error_formula: 'OR({default_formula},{cell}>YEAR(TODAY()),{cell}<2011)'
- datastore_id: month
label:
en: Month (1-12)
fr: Mois (1-12)
description:
en: A numerical representation of the month for which you are reporting no summaries to publish.
fr: Une représentation numérique du mois pour lequel vous ne signalez aucun résumé a publier.
validation:
en: Must be in the range of 1-12 (representing January-December).
fr: Doit être dans la gamme de 1-12 (représente janvier-décembre)
datastore_type: month
form_attrs:
size: 5
form_required: true
excel_required: true
excel_column_width: 18
excel_error_formula: 'OR({default_formula},{cell}<1,{cell}>12)'
solr_month_names: true
- datastore_id: record_created
label: Record Creation Time
import_template_include: false
visible_to_public: false
datastore_type: timestamp
preview_class: bg-info
- datastore_id: record_modified
label: Last Record Modification Time
import_template_include: false
visible_to_public: false
datastore_type: timestamp
preview_class: bg-info
- datastore_id: user_modified
label: User Last Modified Record
import_template_include: false
visible_to_public: false
datastore_type: text
preview_class: bg-info
solr_static_fields:
report_type_en: Nothing to report
report_type_fr: Rien à signaler
nothing_to_report_en: Nothing to report this month
nothing_to_report_fr: Rien à signaler pour cette période
solr_legacy_ati_ids: true
datastore_primary_key: [year, month]
datastore_indexes: ""
default_preview_sort: year desc, month desc
triggers:
- ati_nil_trigger: |
DECLARE
errors text[][] := '{{}}';
BEGIN
errors := errors || required_error(NEW.year, 'year');
IF NEW.year < 2011 OR NEW.year > date_part('year', CURRENT_DATE) THEN
errors := errors || ARRAY[['year', {year_error}]];
END IF;
errors := errors || required_error(NEW.month, 'month');
IF NEW.month < 1 OR NEW.month > 12 THEN
errors := errors || ARRAY[['month', {month_error}]];
END IF;
IF errors = '{{}}' THEN
RETURN NEW;
END IF;
RAISE EXCEPTION E'TAB-DELIMITED\t%', array_to_string(errors, E'\t');
END;
- update_record_modified_created_trigger
trigger_strings: # yaml | not supported
year_error: Please enter a valid year
month_error: Please enter a month number from 1-12
examples:
record:
month: 10
year: 2014
filters:
year: 2014
filter_one:
month: 10
year: 2014
sort: year desc, month desc
excel_edge_style:
PatternFill:
patternType: solid
fgColor: FF7815bf
excel_header_style:
PatternFill:
patternType: solid
fgColor: FFbc83d8
excel_column_heading_style:
PatternFill:
patternType: solid
fgColor: FFbc83d8