department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
97 stars 69 forks source link

Discovery: Learn how the notifications framework works & map plan for Q4 notifications work #15533

Closed jilladams closed 11 months ago

jilladams commented 1 year ago

User story: Full Width Banners

AS AN Editor I WANT to select the initial period for display of my full-width banner, up to 7 days SO THAT site visitors always get a relevant experience.

AS A VA owner I WANT aging banners to expire SO THAT site visitors always get a relevant experience.

User story: Homepage blocks

AS A Home Page Editor I WANT to be notified when my content is old SO THAT site visitors always get a relevant experience.

Q4 intentions

Create notifications for:

The current mechanism for Notifications is default monthly send. The full width banners requirements suggest one-off emails on a specified timeframe, rather than monthly. This is potentially the biggest leap in the framework that will need to be made.

CMS team created a Notifications framework that is currently being used to send notices to VAMC and Vet Center editors. We need to understand how it works today, in order to understand what work may be needed to use it for our Q4 intentions.

Previous implementations / SMEs

VAMC notifications: Edmund created the framework and managed first usage for VAMCs.

Facilities: Vet Center notifications: Steve Wirt made the email template responsive, and managed use for Vet Centers.

ACs

8 points timebox to check in re: more time needed.

jilladams commented 1 year ago

Notes

Full width banners:

Requirements we've heard from Dave:

We will need to build:

Questions:

Blocks

We need to build:

Questions:

Menus

Requirements: Top pages menu (https://prod.cms.va.gov/admin/structure/menu/manage/popular-on-va-gov), should be periodically refreshed.

We need to build:

(If emails):

Questions:

jilladams commented 1 year ago

Menus: DaveC removed from Q4 scope.

jilladams commented 12 months ago

From planning: there is some risk in S95 that this ticket will begin and not end, tbd outcomes on #15641. DaveC has signed off.

jilladams commented 12 months ago

13529 is unblocked for Nat'l Events Calendar work, and has been injected into sprint, which pushes this ticket lower in priority. It will not close within sprint, and we'll assess how much work remains by end of sprint, depending on how Events work shakes out.

FranECross commented 11 months ago

@dsasser @chri5tia Jill and I edited the ticket for clarity. Will you please review and let us know if you have any questions? cc @jilladams

jilladams commented 11 months ago

@FranECross @dsasser @chri5tia I'm realizing now that this comment: https://github.com/department-of-veterans-affairs/va.gov-cms/issues/15533#issuecomment-1745885554, contains additional notes that weren't integrated in the ticket body before.

This discovery is specific to the Notifications framework. Fran, when we talked earlier, I mentioned that there are some other specific things Dave is interested in re: enforcing governance (auto expiring nodes, not allowing Full width banners to be re-published, etc.) I don't know if those should or shouldn't be included in this discovery.

Daniel and Christia plan to co-work on this ticket tomorrow, and we have BE refinement at 3:30 tomorrow. I propose we kick off BE refinement by talking about this ticket, and clean up any danglers as needed.

FranECross commented 11 months ago

@jilladams Thanks for this additional information! I'm onboard with your proposal to chat about this ticket during BE refinement. Thank you! cc @dsasser @chri5tia

dsasser commented 11 months ago

@jilladams @FranECross thank you both for clarifying the scope and details of this discovery.

Some questions:

When content is auto-archived

How long after creation should the FWB be archived? If it is archived the same day it expires, we would be sending 2 emails on the same day for a given FWB.

Who should be receiving the email notifications? The current framework doesn't use the author of the content, but the owner of the Section.

Does editing a FWB cause the 7 day window to reset automatically?

provide a date picker Editors can use to set a different sooner date

Does this mean that the user is unable to set a future date greater than 7 days?

Regarding expiring FWB: do we want to do any FE work to ensure the banner is not displayed after the specified expiration date.

FranECross commented 11 months ago

@dsasser Thanks so much for the excellent questions! We'll be discussing this story in BE refinement today (10/31), and I may need to take some questions back to Dave for clarification to ensure we're following what he'd envisioned. cc @jilladams

chri5tia commented 11 months ago

Questions:

  • Are emails the right mechanism? Should we instead consider automating this section to be a widget that displays most-visited pages? (Instead of a Drupal menu.) We've discussed this possibility before, no backlog ticket that I can find).

It doesn't feel like an email notification is the right system. Users/section owners are getting emails for outdated nodes once a month which is supposed to take them to a view of outdated content (nodes). An outdated block would get overlooked or mixed up with outdated nodes that the view is on. There are so few nodes that there might be an easier way or if we do this we would need to build a new view and a new custom module. I am still thinking of alternative ideas.

  • If emails:
    • How frequently should this menu be updated / should emails send?
    • For menus: unclear, without Editorial Workflow, but I believe a Public Websites team member created this menu and would receive these emails until another Editor modifies it.

I need to look into this further and need more understanding about the the menu piece.

This discovery is specific to the Notifications framework. Fran, when we talked earlier, I mentioned that there are some other specific things Dave is interested in re: enforcing governance (auto expiring nodes, not allowing Full width banners to be re-published, etc.) I don't know if those should or shouldn't be included in this discovery.

Some Notes

Some questions

Engineering thoughts/questions

dsasser commented 11 months ago

@chri5tia re your comment:

I need to look into this further and need more understanding about the the menu piece.

There is no menu requirement. This requirement was removed a few days ago. The active ticket description defines the current state of the ask.

a new custom module would be needed

That is speculative. We could add any additional work to the existing va_gov_notifications module.

I wonder how our existing system compares with this experimental module, which we don't seem to be using: https://www.drupal.org/project/outdated_content

This module works only with nodes, so it is a non-starter for our needs.

for auto-archiving, we can look at this D7 module for ideas: https://www.drupal.org/project/autoarch

I've discussed with the team if auto-archiving is currently in place, and it is not. However, the Scheduler module, along with the Scheduler content moderation integration modules are probably the best place to start, since they have widely used D8 versions, and Swirt and myself have used them in the past for this purpose.

dsasser commented 11 months ago

@jilladams @FranECross

Per these questions:

If included: we need to update ticket body again to be explicit about that, based on the notes in the comment I linked above. If excluded: we need a separate ticket to cover those pieces.

And considering Christia's note above, we have identified these as future discovery and implementation tasks which should be carved into separate tickets.

chri5tia commented 11 months ago

@dsasser Thanks for clarifying about the menu. Scheduler module is a nice suggestion.

That is speculative. We could add any additional work to the existing va_gov_notifications module.

I meant "new module" as in new custom module functionality that doesn't use the existing module functionality. Whether it's there or somewhere else is out the scope of what I intended to communicate.

jilladams commented 11 months ago

Draft plan: I updated to add 2 things: https://docs.google.com/document/d/1h7oCFheAVZ8rhlmyE37GZYfGpE5rKS15lNIBIFgn5P4/edit?pli=1

  1. A section that speaks to auto archiving, just compiling the notes from comments.
  2. A section of unanswered questions, also from comments.

@dsasser can you review those sections and just make sure I didn't misstate anything, or if some of the questions have been answered, move them as needed?

@FranECross we could use a new discovery ticket to cover research around the auto-archiving concepts here. If we can get that up and pre-fined, we could pull it into next sprint.

I think we need to have a big conversation with Dave around this. Not certain if that should start with Product only, or include Daniel. @FranECross would be interested in your thoughts based on our conversations thus far / Daniel's doc.

dsasser commented 11 months ago

Discovery Findings

VACMS-15533_ Discovery notifications framework.pdf

Text-based findings for searchability VACMS-15533 https://github.com/department-of-veterans-affairs/va.gov-cms/issues/15533 Gap Analysis: Can the existing notifications framework handle needs for PW Q4 goals? In short, no. The framework isn’t meant to be modified much for purposes other than to meet the needs of 6102. Overall, we have two options: 1. Expand the framework to be more flexible with types of notifications, cadences, and entity types - a very large lift (more than 2 sprints) 2. Implement a new framework which meets our criteria - a large lift (at least 2 sprints) Requirement Gap/FC/Other Notes Sending email ✅ FC The notification system can send emails with (mostly) any content, driven by the existing mail sub-system and related templates. Additional/differing mail delivery frequencies (2 days in advance of the specified date, day of expiration, when content is auto-archived) ❌ GAP Framework meant to send once per month only. Additional frequencies would require both backend code, and additional Jenkins job(s). Expiration of content outside of the 6102 directive. (7 day default expiration for Full Width Banners (Full Width Alert [banner])) ❌ GAP The framework is meant for monthly notifications for content which has expired, according to the rules the framework dictates. No mechanism for defining a different expiration exists. Additionally, if we were to incorporate additional expiration types and timeframes, we could likely compromise the original intent of the existing framework to comply with 6102. Works with Blocks ❌ GAP Not a feature of the existing framework. Aging banner expiration ❌ GAP Existing framework only works with content expiration determined by the ‘field_last_saved_by_an_editor’ value. Auto-Archiving ❌ GAP Not a feature of the existing framework Permanent Archiving ❌ GAP Not a feature of the existing framework. Editors can define a custom expiration date. ❌ GAP Not a feature of the existing framework. Configuration for when notifications are sent. ❌ GAP There is no such configuration available in the current framework. The current monthly rule exists only in code. ________________ Discovery Notes Expand the framework to work with blocks. When running the monthly process, the existing framework looks for content that is “expired”, or, hasn’t been updated in a year or more. The query involved, getOutdatedContentForSection(): * Returns only Node content. * Only returns nodes that: * Are published * Are not exempted by type * Have a `field_last_saved_by_an_editor` timestamp a year or more old * Match the provided Section (using field_administration) If we were to add blocks to the existing framework, we would need to: * Add the ‘field_last_saved_by_an_editor’ to each block type. * And populate this field with a value using an update/similar hook. * And add a form alter to populate this field OR update the existing alter to expand to any entity type with this field. * Update the getOutdatedContentForSection to also query for blocks. This would need to be a second query which would then need to append its results to the existing query (entity queries run against a single entity type). Making this more complicated than nodes is the mix of various field names for the same function on blocks–the section is either in the field_owner or field_administration fields. However, because of the cadence and type of emails we expect to be sending (2 days in advance, day of, on auto-archive) for PW needs, we could not add the three email cadences to the existing framework without also impacting the existing delivery cadence for expired content. Block count by type: Concerns and Questions If a block belongs to the same Section as a node, what would be the default outcome of that for the recipient? How would the UX work with different entity types in a single email? The existing framework sends a link to a dashboard within the email (it doesn’t send the expired content to the user, as the length of a given email might be too much for an email system to handle). Portions of the existing framework assumes Nodes. There could be parts of the workflow that could be drastically/unavoidably affected by adding Blocks, unless we sidecar blocks as a secondary/alternative workflow. Date mechanism on the Full Width Banners node form Adding a date field to a single node/other entity is trivial. Expand Notifications framework to send emails driven by dates on nodes. To support this, we would need to either: * Enhance the current framework to be more flexible * Create a secondary framework that doesn’t impact 6102 Both of these options would be a large lift. Clarifying Notes from Ticket: Email recipients: Notifications framework currently sends to the "last modified by" Editor. ❌ The ‘last modified by’/’author’ of the content is never used. The emails are sent to section members who have expiring content: From Edmund: * emails are sent to section members. So we check to see if a section's content is outdated and then notify the members of that section that it is outdated. We do not look at the author at all. We did this because people can move/leave and/or new people can join a section. * … Erika noted that the Notifications framework uses Flags. We need to work out the exact use, and whether Blocks / Menus can be flagged, or if the framework will need to be expanded to some other trigger. ❌ The notifications framework does not use flags. ✅ Only content (nodes) is currently supported. Supporting Blocks is a possibility, but has concerns for overlap with the existing process. Namely, there is no existing mechanism to splinter disparate entity types for unique notifications and delivery schedules. Notifications engine is based on annual content refresh ("web content should be reviewed by web editors once per year", product brief), and batches monthly emails to the "last modified by" Editor on content approaching the one-year since update mark. ✅ The framework queries for content that is older than 1 year, based on the value of the ‘last saved by editor’ field mentioned earlier. As far as we know, Notifications system only handles Nodes (not blocks, menus, taxonomy terms, etc) ✅ The framework only works with Nodes today. Adding additional entity types to the existing framework would be a large lift. Auto-archiving content This is a separate topic from the bigger picture Notifications framework, but addressed here due to the ticket definition. This project will require CMS Collab Cycle. Auto-archiving mechanism doesn’t exist in the CMS today. Will require its own discovery and lift. Permanently archiving content that cannot be re-published is a new paradigm. Will require its own discovery / lift. These should be ticketed for separate discovery. Remaining questions: * How long after creation should the FWB be archived? If it is archived the same day it expires, we would be sending 2 emails on the same day for a given FWB. * Does editing a FWB cause the 7 day window to reset automatically? * Is 7 days a hard minimum, and date picker will not allow user to set a future date greater than 7 days? * Regarding expiring FWB: do we want to do any FE work to ensure the banner is not displayed after the specified expiration date. * Yes. FE should not display banners after the expiration date.
FranECross commented 11 months ago

@jilladams I think chatting with Dave sounds great. I think having Daniel present to provide intel on why things are a heavy-lift if Dave wants details during the meeting. Here's a first draft of AC for a new story around Notifications & Auto-archiving for both banners and blocks of info, split out into two separate sections. Feedback is always welcome.

Auto archiving and notifications for banners_blocks.pdf

cc @dsasser

jilladams commented 11 months ago

From scrum this morning: @FranECross will go ahead and cut the new Discovery tickets with the proposed ACs from comment above.

jilladams commented 11 months ago

@dsasser FYI that we discussed findings a little with Dave today. From that conversation:

Next steps here:

For this ticket's purposes, we can close, but: will leave that to @FranECross in case we need to further discuss anything here first.