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

[TTAHUB-3192] Fetch topics separately for RTTAPA #2277

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

thewatermethod
Copy link
Collaborator

Description of change

Fetch topics data on the RTTAPA with Sequelize's separate: true flag, since the current way seems to run up against some limit with certain recipients.

How to test

Confirm the RTTAPA cards display the correct topics. Open the case from the support ticket. Confirm that the recipient is visible and that the goal query doesn't time out and display an error in the front end.

Issue(s)

Checklists

Every PR

  • Meets issue criteria
  • JIRA ticket status updated
  • Code is meaningfully tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • API Documentation updated
  • Boundary diagram updated
  • Logical Data Model updated
  • Architectural Decision Records written for major infrastructure decisions
  • UI review complete

Before merge to main

  • OHS demo complete
  • Ready to create production PR

Production Deploy

  • Staging smoke test completed

After merge/deploy

  • Update JIRA ticket status

@@ -486,7 +486,7 @@ function calculatePreviousStatus(goal) {
// otherwise we check to see if there is the goal is on an activity report,
// and also check the status
if (goal.objectives.length) {
const onAr = goal.objectives.some((objective) => objective.activityReports.length);
const onAr = goal.objectives.some((objective) => objective.onApprovedAR);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is just a convenience (we already had the flag in the query)

include: [
{
model: Topic,
through: [],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

through and separate don't play nice

@@ -733,25 +734,6 @@ export async function getGoalsByActivityRecipient(
where: {
calculatedStatus: REPORT_STATUSES.APPROVED,
},
include: [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This doesn't seem necessary

@thewatermethod thewatermethod marked this pull request as ready for review July 17, 2024 17:47
@thewatermethod thewatermethod merged commit f94562e into main Jul 22, 2024
10 checks passed
@thewatermethod thewatermethod deleted the mb/TTAHUB-3192/fix-for-rtr-not-loading-goals branch July 22, 2024 13:23
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.

2 participants