Skip to content

Commit e7e4e61

Browse files
authored
VACMS-14816 Add Vet Center outdated content email (#15232)
* VACMS-14816 Clarify name of notification logger. * VACMS-14816 CS cleanup of OutdatedContentNotification. * VACMS-14816 Add Vet Center email content to template. * VACMS-14816 Align method names with what they do. * VACMS-14816 Make queue functions more DRY. * VACMS-14816 Cleaning up doc blocks. * VACMS-14816 Prepare for releasing cron run. * VACMS-14816 Make OutdatedContent more ready to support other products. * VAMC-14816 Add ability to test with specific users. * VACMS-14816 Add support for different email subjects. * VACMS-14816 Update vet center outdated content email. * VACMS-14848 Add documention to module and update existing docs. * VAMC-14816 Move preprocess to message fields. * VACMS-14816 Update documentation to included editing the section term. * VACMS-14816 Remove blocked users if they are called explicitly. * VACMS-14816 Update VAMC email to use message content template and scalable. * VACMS-14816 Fix broken link in vet center email. * VACMS-14816 Add caveat notes to documentation. * VACMS-14816 Releasing the task to run on cron. * VACMS-14816 Remove image height to fix display on mobile. * VACMS-14816 Minor template tweaks to fix mobile. * VACMS-14816 Update KB url in vet center template.
1 parent abd5120 commit e7e4e61

25 files changed

+451
-201
lines changed

READMES/cms-editor-notifications.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,24 @@
22

33
1. CMS Helpdesk
44
Used to notify an editor(s) directly via email.
5-
2. [Site Alert](#site-alert)
6-
3. CMS Notification System (non-existent at this time)
5+
2. [Sitewide Alert](#sitewide-alert)
6+
3. [CMS Notification System](https://github.com/department-of-veterans-affairs/va.gov-cms/tree/main/docroot/modules/custom/va_gov_notifications/README.md)
77

88

99
## Sitewide Alert
1010

11-
Sitewide Alerts (formerly Site Alerts) appear onscreen for ALL CMS users in real time. They do not require
12-
a page reload. They are refreshed on a 15 second AJAX interval. This leverages the Drupal [Sitewide Alert](https://www.drupal.org/project/sitewide_alert) module.
11+
Sitewide Alerts (formerly Site Alerts) appear onscreen for ALL CMS users in real
12+
time. They do not require a page reload. They are refreshed on a 15 second
13+
AJAX interval. This leverages the Drupal [Sitewide Alert](https://www.drupal.org/project/sitewide_alert) module. These only show in the CMS. They do not ever appear on VA.gov.
1314

1415
Sitewide alerts are managed in two places:
1516

1617
- [/admin/config/sitewide_alerts](https://prod.cms.va.gov/admin/config/sitewide_alerts) for global settings
1718
- [/admin/content/sitewide_alert](https://prod.cms.va.gov/admin/content/sitewide_alert) for individual alerts
1819

19-
These can be added by humans but are also added and removed by our [Build-Release-Deploy System](devops/deploy-process.md).
20+
These can be added/edited by humans but are also added and removed by our [Build-Release-Deploy System](devops/deploy-process.md).
21+
22+
CMS Helpdesk has guidance on when and how to use them.
2023

2124
----
2225

READMES/drush.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,5 @@ See [MetricsCommands.php](../docroot/modules/custom/va_gov_backend/src/Commands/
3636

3737
### Outdated Content
3838
See
39-
[OutdatedContent.php](..docroot/modules/custom/va_gov_notifications/src/Service/OutdatedContent.php
40-
).
41-
- `drush php-eval "print_r(\Drupal::service('va_gov_notifications.outdated_content')->checkForOutdatedVamcContent());"` -- Check for outdated VAMC content and queue notifications for any found.
42-
- `drush php-eval "print_r(\Drupal::service('va_gov_notifications.outdated_content')->checkForOutdatedVetCenterContent());"` -- Check for outdated Vet Center content and queue notifications for any found.
39+
[CMS Notification System](https://github.com/department-of-veterans-affairs/va.gov-cms/tree/main/docroot/modules/custom/va_gov_notifications/README.md) for commands to test or
40+
execute the various outdated content sends.

config/sync/core.entity_form_display.message.vamc_outdated_content.default.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ langcode: en
33
status: true
44
dependencies:
55
config:
6+
- field.field.message.vamc_outdated_content.field_editor_username
67
- field.field.message.vamc_outdated_content.field_subject
8+
- field.field.message.vamc_outdated_content.field_webhost
79
- message.template.vamc_outdated_content
810
id: message.vamc_outdated_content.default
911
targetEntityType: message
@@ -12,13 +14,13 @@ mode: default
1214
content:
1315
created:
1416
type: datetime_timestamp
15-
weight: 10
17+
weight: 1
1618
region: content
1719
settings: { }
1820
third_party_settings: { }
1921
field_subject:
2022
type: string_textfield
21-
weight: 11
23+
weight: 2
2224
region: content
2325
settings:
2426
size: 60
@@ -27,7 +29,7 @@ content:
2729
field_name: field_subject
2830
uid:
2931
type: entity_reference_autocomplete
30-
weight: 5
32+
weight: 0
3133
region: content
3234
settings:
3335
match_operator: CONTAINS
@@ -38,3 +40,4 @@ content:
3840
'#group': advanced
3941
hidden:
4042
field_editor_username: true
43+
field_webhost: true

config/sync/core.entity_form_display.message.vet_center_outdated_content.default.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ langcode: en
33
status: true
44
dependencies:
55
config:
6+
- field.field.message.vet_center_outdated_content.field_editor_username
67
- field.field.message.vet_center_outdated_content.field_subject
8+
- field.field.message.vet_center_outdated_content.field_webhost
79
- message.template.vet_center_outdated_content
810
id: message.vet_center_outdated_content.default
911
targetEntityType: message
@@ -12,13 +14,13 @@ mode: default
1214
content:
1315
created:
1416
type: datetime_timestamp
15-
weight: 10
17+
weight: 2
1618
region: content
1719
settings: { }
1820
third_party_settings: { }
1921
field_subject:
2022
type: string_textfield
21-
weight: 11
23+
weight: 1
2224
region: content
2325
settings:
2426
size: 60
@@ -27,7 +29,7 @@ content:
2729
field_name: field_subject
2830
uid:
2931
type: entity_reference_autocomplete
30-
weight: 5
32+
weight: 0
3133
region: content
3234
settings:
3335
match_operator: CONTAINS
@@ -38,3 +40,4 @@ content:
3840
'#group': advanced
3941
hidden:
4042
field_editor_username: true
43+
field_webhost: true

config/sync/core.entity_view_display.message.vamc_outdated_content.default.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dependencies:
55
config:
66
- field.field.message.vamc_outdated_content.field_editor_username
77
- field.field.message.vamc_outdated_content.field_subject
8+
- field.field.message.vamc_outdated_content.field_webhost
89
- message.template.vamc_outdated_content
910
module:
1011
- user
@@ -19,15 +20,21 @@ content:
1920
settings:
2021
link_to_entity: false
2122
third_party_settings: { }
22-
weight: 1
23+
weight: 0
2324
region: content
2425
field_subject:
2526
type: string
2627
label: above
2728
settings:
2829
link_to_entity: false
2930
third_party_settings: { }
31+
weight: 1
32+
region: content
33+
partial_0:
34+
settings: { }
35+
third_party_settings: { }
3036
weight: 2
3137
region: content
3238
hidden:
39+
field_webhost: true
3340
search_api_excerpt: true

config/sync/core.entity_view_display.message.vamc_outdated_content.mail_body.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dependencies:
66
- core.entity_view_mode.message.mail_body
77
- field.field.message.vamc_outdated_content.field_editor_username
88
- field.field.message.vamc_outdated_content.field_subject
9+
- field.field.message.vamc_outdated_content.field_webhost
910
- message.template.vamc_outdated_content
1011
module:
1112
- layout_builder
@@ -19,11 +20,16 @@ targetEntityType: message
1920
bundle: vamc_outdated_content
2021
mode: mail_body
2122
content:
23+
partial_0:
24+
settings: { }
25+
third_party_settings: { }
26+
weight: 0
27+
region: content
2228
partial_1:
2329
weight: 0
2430
region: content
2531
hidden:
2632
field_editor_username: true
2733
field_subject: true
28-
partial_0: true
34+
field_webhost: true
2935
search_api_excerpt: true

config/sync/core.entity_view_display.message.vamc_outdated_content.mail_subject.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dependencies:
66
- core.entity_view_mode.message.mail_subject
77
- field.field.message.vamc_outdated_content.field_editor_username
88
- field.field.message.vamc_outdated_content.field_subject
9+
- field.field.message.vamc_outdated_content.field_webhost
910
- message.template.vamc_outdated_content
1011
module:
1112
- layout_builder
@@ -27,10 +28,9 @@ content:
2728
third_party_settings: { }
2829
weight: 0
2930
region: content
30-
partial_0:
31-
weight: 0
32-
region: content
3331
hidden:
3432
field_editor_username: true
33+
field_webhost: true
34+
partial_0: true
3535
partial_1: true
3636
search_api_excerpt: true

config/sync/core.entity_view_display.message.vet_center_outdated_content.default.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dependencies:
55
config:
66
- field.field.message.vet_center_outdated_content.field_editor_username
77
- field.field.message.vet_center_outdated_content.field_subject
8+
- field.field.message.vet_center_outdated_content.field_webhost
89
- message.template.vet_center_outdated_content
910
module:
1011
- user
@@ -19,14 +20,27 @@ content:
1920
settings:
2021
link_to_entity: false
2122
third_party_settings: { }
22-
weight: 1
23+
weight: 0
2324
region: content
2425
field_subject:
2526
type: string
2627
label: above
2728
settings:
2829
link_to_entity: false
2930
third_party_settings: { }
31+
weight: 1
32+
region: content
33+
field_webhost:
34+
type: string
35+
label: above
36+
settings:
37+
link_to_entity: false
38+
third_party_settings: { }
39+
weight: 3
40+
region: content
41+
partial_0:
42+
settings: { }
43+
third_party_settings: { }
3044
weight: 2
3145
region: content
3246
hidden:

config/sync/core.entity_view_display.message.vet_center_outdated_content.mail_body.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dependencies:
66
- core.entity_view_mode.message.mail_body
77
- field.field.message.vet_center_outdated_content.field_editor_username
88
- field.field.message.vet_center_outdated_content.field_subject
9+
- field.field.message.vet_center_outdated_content.field_webhost
910
- message.template.vet_center_outdated_content
1011
module:
1112
- layout_builder
@@ -19,11 +20,16 @@ targetEntityType: message
1920
bundle: vet_center_outdated_content
2021
mode: mail_body
2122
content:
23+
partial_0:
24+
settings: { }
25+
third_party_settings: { }
26+
weight: 0
27+
region: content
2228
partial_1:
2329
weight: 0
2430
region: content
2531
hidden:
2632
field_editor_username: true
2733
field_subject: true
28-
partial_0: true
34+
field_webhost: true
2935
search_api_excerpt: true

config/sync/core.entity_view_display.message.vet_center_outdated_content.mail_subject.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dependencies:
66
- core.entity_view_mode.message.mail_subject
77
- field.field.message.vet_center_outdated_content.field_editor_username
88
- field.field.message.vet_center_outdated_content.field_subject
9+
- field.field.message.vet_center_outdated_content.field_webhost
910
- message.template.vet_center_outdated_content
1011
module:
1112
- layout_builder
@@ -27,10 +28,9 @@ content:
2728
third_party_settings: { }
2829
weight: 0
2930
region: content
30-
partial_0:
31-
weight: 0
32-
region: content
3331
hidden:
3432
field_editor_username: true
33+
field_webhost: true
34+
partial_0: true
3535
partial_1: true
3636
search_api_excerpt: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
uuid: d38436f4-13bf-4a21-9944-0f2cc88aa5ce
2+
langcode: en
3+
status: true
4+
dependencies:
5+
config:
6+
- field.storage.message.field_webhost
7+
- message.template.vamc_outdated_content
8+
module:
9+
- tmgmt_content
10+
third_party_settings:
11+
tmgmt_content:
12+
excluded: false
13+
id: message.vamc_outdated_content.field_webhost
14+
field_name: field_webhost
15+
entity_type: message
16+
bundle: vamc_outdated_content
17+
label: webhost
18+
description: ''
19+
required: false
20+
translatable: true
21+
default_value: { }
22+
default_value_callback: ''
23+
settings: { }
24+
field_type: string
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
uuid: 4d8fac85-d28e-4d18-aafa-c7f7f5965b97
2+
langcode: en
3+
status: true
4+
dependencies:
5+
config:
6+
- field.storage.message.field_webhost
7+
- message.template.vet_center_outdated_content
8+
id: message.vet_center_outdated_content.field_webhost
9+
field_name: field_webhost
10+
entity_type: message
11+
bundle: vet_center_outdated_content
12+
label: webhost
13+
description: ''
14+
required: false
15+
translatable: false
16+
default_value: { }
17+
default_value_callback: ''
18+
settings: { }
19+
field_type: string
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
uuid: b3523b22-1aa3-4a36-b739-7c1a8e725d23
2+
langcode: en
3+
status: true
4+
dependencies:
5+
module:
6+
- message
7+
id: message.field_webhost
8+
field_name: field_webhost
9+
entity_type: message
10+
type: string
11+
settings:
12+
max_length: 255
13+
case_sensitive: false
14+
is_ascii: false
15+
module: core
16+
locked: false
17+
cardinality: 1
18+
translatable: true
19+
indexes: { }
20+
persist_with_no_fields: false
21+
custom_storage: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
text:
2+
-
3+
value: "<p>VA Directive 6102 requires that VA content be reviewed yearly to ensure information is still relevant. Outdated content will need to be updated or removed to be compliant.&nbsp;<a href=\"https://prod.cms.va.gov/help/va-directive-6102\" target=\"_blank\">Learn more about VA Directive 6102.</a></p>\r\n\r\n<hr />\r\n<p>To assist with getting your content 6102 compliant within the next year, we are sending you this monthly reminder to view your outdated content report. To view this report, log in to the Drupal CMS or click “Review” below to go directly to the outdated content tool.</p>\r\n\r\n<p>For more information, you can read this <a href=\"https://prod.cms.va.gov/help/cms-basics/outdated-content-audit-tool\">Knowledge Base article on using the outdated content tool</a> to manage compliance.</p>\r\n\r\n<p>By reviewing an average of at least 25 pieces of content per month, your site will become compliant with VA Directive 6102 within the next year. Continuing to review your content at this rate will also help to ensure that you maintain compliance going forward without feeling overwhelmed.</p>\r\n"
4+
format: rich_text
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
text:
2+
-
3+
value: "<p>VA Directive 6102 requires that VA content is reviewed yearly to ensure information is still relevant. RCS recommends a minimum quarterly review as a best practice. All content will need to be reviewed, and outdated content will need to be edited to remain compliant with VA Directive 6102.&nbsp;<a href=\"https://prod.cms.va.gov/help/va-directive-6102\">Learn more about VA Directive 6102.</a></p>\r\n\r\n<hr />\r\n<p>To assist with getting your content compliant, we are sending you this monthly reminder to log into Drupal, review and update your website content, and attest that your content is up-to-date.</p>\r\n\r\n<p>Reviewing your website top to bottom at least quarterly will help you to maintain updated and accurate location and service information and keep the website compliant with VA Directive 6102. For more information, you can read this <a href=\"https://prod.cms.va.gov/help/vet-centers/vet-center-content-review\">Knowledge Base article</a>&nbsp;for tips and best practices to manage compliance.</p>\r\n\r\n<p>Need help?</p>\r\n\r\n<ul>\r\n\t<li>If you are a Vet Center Director or Outreach Specialist who needs assistance accessing Drupal CMS, please email the CMS Support Team at&nbsp;<a href=\"mailto:[email protected]\">[email protected]</a>.</li>\r\n\t<li>If you want to refresh your skills, need ideas, or have questions about creating content for your webpages, you can find How to Guides and Training videos in the&nbsp;<a href=\"https://prod.cms.va.gov/help/vet-centers\">Drupal CMS Knowledge Base</a>&nbsp;or drop in during office hours.</li>\r\n\t<li>If you received this email and no longer have a role at a Vet Center, please inform us by emailing the CMS Support Team at&nbsp;<a href=\"mailto:[email protected]\">[email protected]</a>.</li>\r\n</ul>\r\n\r\n<p dir=\"auto\">Please note that before the end of the calendar year a formal suspense will be sent to ensure 100 percent compliance. We encourage you to make use of the resources and tools available before then to ensure your success and the success of information delivery on your page!</p>\r\n"
4+
format: rich_text

config/sync/message.template.vamc_outdated_content.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
uuid: 69ae3597-f3f0-4ed5-ad51-42c608ba54d2
22
langcode: en
33
status: true
4-
dependencies: { }
4+
dependencies:
5+
config:
6+
- filter.format.rich_text
57
template: vamc_outdated_content
68
label: 'VAMC Outdated Content'
79
description: 'Email for VAMC section members, notifying them of outdated content. '
8-
text: { }
10+
text:
11+
-
12+
value: "<p>VA Directive 6102 requires that VA content be reviewed yearly to ensure information is still relevant. Outdated content will need to be updated or removed to be compliant.&nbsp;<a href=\"https://prod.cms.va.gov/help/va-directive-6102\" target=\"_blank\">Learn more about VA Directive 6102.</a></p>\r\n\r\n<hr />\r\n<p>To assist with getting your content 6102 compliant within the next year, we are sending you this monthly reminder to view your outdated content report. To view this report, log in to the Drupal CMS or click “Review” below to go directly to the outdated content tool.</p>\r\n\r\n<p>For more information, you can read this <a href=\"https://prod.cms.va.gov/help/cms-basics/outdated-content-audit-tool\">Knowledge Base article on using the outdated content tool</a> to manage compliance.</p>\r\n\r\n<p>By reviewing an average of at least 25 pieces of content per month, your site will become compliant with VA Directive 6102 within the next year. Continuing to review your content at this rate will also help to ensure that you maintain compliance going forward without feeling overwhelmed.</p>\r\n"
13+
format: rich_text
914
settings:
1015
'token options':
1116
clear: false

config/sync/message.template.vet_center_outdated_content.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
uuid: 2d03776a-25fb-4a0c-a447-52cd5d99e430
22
langcode: en
33
status: true
4-
dependencies: { }
4+
dependencies:
5+
config:
6+
- filter.format.rich_text
57
template: vet_center_outdated_content
68
label: 'Vet Center Outdated Content'
79
description: 'Email for Vet Center section members, notifying them of outdated content. '
8-
text: { }
10+
text:
11+
-
12+
value: "<p>VA Directive 6102 requires that VA content is reviewed yearly to ensure information is still relevant. RCS recommends a minimum quarterly review as a best practice. All content will need to be reviewed, and outdated content will need to be edited to remain compliant with VA Directive 6102.&nbsp;<a href=\"https://prod.cms.va.gov/help/va-directive-6102\">Learn more about VA Directive 6102.</a></p>\r\n\r\n<hr />\r\n<p>To assist with getting your content compliant, we are sending you this monthly reminder to log into Drupal, review and update your website content, and attest that your content is up-to-date.</p>\r\n\r\n<p>Reviewing your website top to bottom at least quarterly will help you to maintain updated and accurate location and service information and keep the website compliant with VA Directive 6102. For more information, you can read this <a href=\"https://prod.cms.va.gov/help/vet-centers/vet-center-content-review\">Knowledge Base article</a>&nbsp;for tips and best practices to manage compliance.</p>\r\n\r\n<p>Need help?</p>\r\n\r\n<ul>\r\n\t<li>If you are a Vet Center Director or Outreach Specialist who needs assistance accessing Drupal CMS, please email the CMS Support Team at&nbsp;<a href=\"mailto:[email protected]\">[email protected]</a>.</li>\r\n\t<li>If you want to refresh your skills, need ideas, or have questions about creating content for your webpages, you can find How to Guides and Training videos in the&nbsp;<a href=\"https://prod.cms.va.gov/help/vet-centers\">Drupal CMS Knowledge Base</a>&nbsp;or drop in during office hours.</li>\r\n\t<li>If you received this email and no longer have a role at a Vet Center, please inform us by emailing the CMS Support Team at&nbsp;<a href=\"mailto:[email protected]\">[email protected]</a>.</li>\r\n</ul>\r\n\r\n<p dir=\"auto\">Please note that before the end of the calendar year a formal suspense will be sent to ensure 100 percent compliance. We encourage you to make use of the resources and tools available before then to ensure your success and the success of information delivery on your page!</p>\r\n"
13+
format: rich_text
914
settings:
1015
'token options':
1116
clear: false

0 commit comments

Comments
 (0)