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-2837] Remove r10 NC ARs plus associated goals, objs not used elsewhere #2248

Merged
merged 5 commits into from
Jul 9, 2024

Conversation

hardwarehuman
Copy link
Collaborator

@hardwarehuman hardwarehuman commented Jul 2, 2024

Description of change

This removes a list of national center ARs, plus any goals and objectives that haven't been used elsewhere, and all the associated link records. The request here is to completely remove the history in the sense of deleting the records rather than marking them deleted.

How to test

This contains the ARs to be deleted per the Jira. Thus, it can be used to watch ARs disappear and also run directly:
SELECT COUNT(*) FROM "ActivityReports" WHERE id IN (24998, 24645, 24297, 24122, 27517, 30829, 29864, 6442, 23057, 23718, 25205, 25792, 25577, 25573, 26478, 26210, 27117, 26918, 28451, 28117, 27669, 29542, 29101, 29024, 30137, 29762, 31201);

There's also a post-run query that should give a result like:

----------+------------------------------------------+-------
        1 | ars_to_delete                            |    27
        2 | deleted_activityreportapprovers          |    30
        3 | deleted_activityreportcollaborators      |    55
        4 | deleted_activityreportfiles              |     7
        5 | deleted_activityreportresources          |    22
        6 | nextsteps_to_delete                      |    59
        7 | deleted_nextstepresources                |     0
        8 | deleted_nextsteps                        |    59
        9 | aros_to_delete                           |   505
       10 | deleted_activityreportobjectivefiles     |   157
       11 | deleted_activityreportobjectiveresources |    86
       12 | deleted_activityreportobjectivetopics    |   414
       13 | deleted_activityreportobjectivecourses   |   414
       14 | deleted_aros                             |   505
       15 | objectives_to_delete                     |   378
       16 | deleted_objectivecollaborators           |   378
       17 | deleted_objectives                       |   378
       18 | args_to_delete                           |   512
       19 | deleted_activityreportgoalfieldresponses |     0
       20 | deleted_activityreportgoalresources      |     0
       21 | deleted_args                             |   512
       22 | goals_to_delete                          |    17
       23 | deleted_goalcollaborators                |    17
       24 | deleted_goalfieldresponses               |     0
       25 | deleted_goalresources                    |     0
       26 | deleted_goalstatuschanges                |     0
       27 | deleted_goals                            |    17
       28 | ots_to_delete                            |     9
       29 | gts_to_delete                            |     1
       30 | deleted_goaltemplateobjectivetemplates   |     2
       31 | deleted_objectivetemplates               |     9
       32 | deleted_goaltemplates                    |     1
       33 | deleted_ars                              |    27

The onAR and onApprovedAR update stats should look like:

 order |              description              | matching_values | incorrect_values | should_be_marked_true_but_isnt | marked_true_but_shouldnt_be | total
-------+---------------------------------------+-----------------+------------------+--------------------------------+-----------------------------+-------
     1 | objective onApprovedAR starting stats |              18 |                0 |                              0 |                           0 |    18
     2 | objective onApprovedAR values changed |                 |                  |                                |                             |     0
     3 | objective onApprovedAR ending stats   |              18 |                0 |                              0 |                           0 |    18
     4 | objective onAR starting stats         |              18 |                0 |                              0 |                           0 |    18
     5 | objective onAR values changed         |                 |                  |                                |                             |     0
     6 | objective onAR ending stats           |              18 |                0 |                              0 |                           0 |    18
     7 | goal onApprovedAR starting stats      |              36 |              256 |                              0 |                         256 |   292
     8 | goal onApprovedAR values changed      |                 |                  |                              0 |                         256 |   256
     9 | goal onApprovedAR ending stats        |             292 |                0 |                              0 |                           0 |   292
    10 | goal onAR starting stats              |              36 |              256 |                              0 |                         256 |   292
    11 | goal onAR values changed              |                 |                  |                              0 |                         256 |   256
    12 | goal onAR ending stats                |             292 |                0 |                              0 |                           0 |   292

Issue(s)

Checklists

Every PR

  • Meets issue criteria
  • JIRA ticket status updated
  • Code is meaningfully tested

Before merge to main

  • Ready to create production PR

Production Deploy

  • Staging smoke test completed

After merge/deploy

  • Update JIRA ticket status

@hardwarehuman hardwarehuman merged commit 47d8bb0 into main Jul 9, 2024
10 checks passed
@hardwarehuman hardwarehuman deleted the TTAHUB-2837/remove-r10-nc-ars branch July 9, 2024 14:54
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