Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VACMS-17116: Create Views result condition plugin #17357

Merged
merged 15 commits into from
Mar 1, 2024

Conversation

dsasser
Copy link
Contributor

@dsasser dsasser commented Feb 27, 2024

Description

Relates to #17116

Background:
Because we are leveraging the ECA (Event, Condition, Action) module for the notifications framework, we need a way to query a View for results before acting on them. So this PR creates:

  • A new ECA Condition plugin: Views Result. This plugin queries a configured View and returns TRUE only if there are results.
  • A new Views Display plugin: ECA Result. This plugin doesn't provide any functionality on its own but the Views Result Condition Plugin will allow selecting only Views which have this ECA Result Display type. This works similarly to how Entity Reference fields can be configured to allow entities only from a View with an Entity Reference Source Views display to be referenced.

Testing done

Tested using various node types and Views.

Screenshots

Screenshot 2024-02-27 at 1 26 08 PM
Screenshot 2024-02-27 at 1 25 50 PM
Screenshot 2024-02-27 at 1 27 43 PM

QA steps

As an administrator:

  1. Visit https://pr17357-6w0agqkcuvtjtypasyuin5rrkkjvr8sj.ci.cms.va.gov/admin/config/workflow/eca/expiring_fwb/edit
  2. Under Workflow, click the 'Enabled' checkbox, and click the Save button.
  3. In the Admin Toolbar, to the left of the 'Content' menu, under the VA menu, select 'Run cron'
  4. Wait for the page to reload
    • Verify there is a message at the top of the page that reads 'The Scheduled Notifications: Full Width Alert View has results.'
  5. Visit https://pr17357-6w0agqkcuvtjtypasyuin5rrkkjvr8sj.ci.cms.va.gov/admin/structure/views/view/scheduled_notifications_full_width_alert/edit/eca_result_1
  6. In the Pager section, click the '10 items' link.
  7. In the modal, set the Offset to 11 and click Apply
  8. Save the View
  9. In the Admin Toolbar, to the left of the 'Content' menu, under the VA menu, select 'Run cron'
  10. Wait for the page to reload
    • Verify there is NO message at the top of the page that reads 'The Scheduled Notifications: Full Width Alert View

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 27, 2024 21:30 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2024 17:52 Destroyed
Copy link
Contributor

@edmund-dunn edmund-dunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All QA steps completed successfully. Nice work!

@dsasser dsasser merged commit acfa2a5 into main Mar 1, 2024
21 checks passed
@dsasser dsasser deleted the VACMS-17116-create-views-result-condition-plugin branch March 1, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants