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

Next Build event listing does not show the same events and Content Build #18546

Closed
3 tasks
Tracked by #607
timcosgrove opened this issue Jul 17, 2024 · 0 comments
Closed
3 tasks
Tracked by #607
Assignees
Labels
Accelerated Publishing Defect Something isn't working (issue type)

Comments

@timcosgrove
Copy link
Contributor

timcosgrove commented Jul 17, 2024

What is the problem?

Next Build event listing does not show the same events and Content Build. For Outreach and Events listing, Next Build shows about 60 events and Content Build shows about 200.

Who is affected?

How urgent is the issue?

Critical / Major / Minor

Tasks

Preview Give feedback

How can we see the problem? (repro steps)

  1. Please include a set of steps that allows an independent tester to see the problem.
  2. Write them so that after the defect is fixed, the steps will result in the expected result.
  3. It is helpful to write the steps methodically so they can be the foundation of an automated test.

Expected result: What should be the outcome?

Actual result: What currently happens?

Is there any additional information?

Screenshots:

Log messages (please specify from where or what commands(s))

Log messages here

Why is the problem happening and how do we fix it?

Normally an event is assigned to an event listing page via field_listing, which is a pulldown that lists all the existing event listing pages:
image

The Outreach and Events listing pages is a special case. You can assign an event to the Outreach and Events listing page using the "normal" method, i.e. the pulldown:
image

However, event pages also have a checkbox 'Publish to the National Outreach Calendar', which corresponds to the field field_publish_to_outreach_cal. Editors can check this box to make their event show up on the Outreach and Events listing page. Many events are attached to a specific calendar - Battle Creek Event Listings or whatever - and then also assigned to the National Outreach Calendar, via this checkbox.

Currently, Next Build is only querying for events that have chosen Outreach and Events for the primary listing page. There are about 48 events that are in the future that have Outreach and Events chosen as their listing page.

It needs to also query for when field_publish_to_outreach_cal is checked, and combine the two. Since it is possible to assign an event to Outreach and Events listing without checking the checkbox, it is not enough to query the checkbox only. It needs to combine both, and then account for duplicates, since it's also possible to select Outreach and Events AND have the checkbox checked.

On the Next Build side, the query for event listings will need to be modified. Specifically, this part of the event listing query currently takes care of finding all the events for a specific listing page: https://github.com/department-of-veterans-affairs/next-build/blob/main/src/data/queries/eventListing.ts#L39

This will need to be augmented to check if the page being built is the Outreach and Events page, and to add the enhanced query if it is.

This will most likely be achieved with a 'Filter Group'. Filter groups for JSON:API queries are described here: https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module/filtering

drupal_jsonapi_params, the package that provides the methods for these queries, has an addGroup method, which is documented here: https://github.com/d34dman/drupal-jsonapi-params?tab=readme-ov-file#addgroup

The node id for the Outreach and Events listing page is 736; this is the case which you'd want to take into account when building up this modified query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accelerated Publishing Defect Something isn't working (issue type)
Projects
None yet
Development

No branches or pull requests

3 participants