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-2808]link historical objectives to templates #2354

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

hardwarehuman
Copy link
Collaborator

@hardwarehuman hardwarehuman commented Sep 6, 2024

Description of change

This links objectives (and now goals!) that should have been connected to a objective(goal) template to that template. In some cases where the template wasn't created, it also creates the template.

How to test

There's a built in results test at the end that should look like:

 is_rtr | most_advanced_ar_status | no_templ_before | no_templ_after | before | after
--------+-------------------------+-----------------+----------------+--------+-------
 f      | deleted                 |             213 |            213 |    498 |   498
        | deleted                 |               6 |              6 |     15 |    15
 f      | draft                   |             342 |            342 |    422 |   428
 t      | draft                   |               2 |              2 |      2 |     2
        | draft                   |               1 |              1 |      1 |     1
 f      | submitted               |               2 |              0 |    231 |     0
 t      | submitted               |               0 |              0 |      7 |     0
 f      | needs_action            |               1 |              0 |     38 |     0
 f      | approved                |            1259 |              0 |  43734 |     0
 t      | approved                |               2 |              0 |    198 |     0
        | approved                |              55 |              0 |   2039 |     0
 f      |                         |           12145 |          12004 |  25754 | 25776
 t      |                         |             605 |            605 |   2612 |  2615
        |                         |               6 |              3 |    316 |   316

The goal results look like:

 is_rtr | most_advanced_ar_status | no_templ_before | no_templ_after | before | after
--------+-------------------------+-----------------+----------------+--------+-------
 f      | deleted                 |              96 |             93 |    275 |   275
 t      | deleted                 |               1 |              1 |      1 |     1
 f      | draft                   |              51 |             51 |     95 |    95
 t      | draft                   |               0 |              0 |      1 |     1
 f      | submitted               |               3 |              0 |     22 |     0
 f      | needs_action            |               0 |              0 |     34 |     0
 f      | approved                |             465 |              0 |  23025 |     0
 t      | approved                |               1 |              0 |    352 |     0
 f      |                         |            3927 |           3619 |  10598 | 10598
 t      |                         |             545 |            517 |    799 |   799

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 marked this pull request as ready for review September 6, 2024 18:34
@hardwarehuman hardwarehuman changed the title [TTTAHUB-2808]link historical objectives to templates [TTAHUB-2808]link historical objectives to templates Sep 10, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks fairly good, But I think before we can attach/create templates for goals and objectives, the templates need to be deduped. There are currently 3 goal templates that have the same region and hash multiple times, similarly there are 95 objective templates that have same region and hash multiple times. To not exacerbate the issue, I think the duplicates would need to be removed after all references to them are replaced with the first instance of each of the templates.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Very true and will have a new version with deduped templates in a bit.

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