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

[POLIO-1802] Delete subactivity scopes on scope level switch #1951

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

Conversation

tdethier
Copy link
Member

@tdethier tdethier commented Feb 3, 2025

Delete all subactivity scopes whenever the scope level changes (from campaign to rounds or from rounds to campaign).

Related JIRA tickets : POLIO-1802

Self proofreading checklist

  • Did I use eslint and black formatters
  • Is my code clear enough and well documented
  • Are my typescript files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Doc

/

Changes

/

How to test

  • Choose a campaign with current campaign or round scopes
  • Create new subactivities with scopes if there aren't any
  • Switch the campaign-level scopes to round-level scopes (or vice versa)
  • Check that all subactivity scopes were deleted

Print screen / video

/

Notes

/

Follow the Conventional Commits specification

The merge message of a pull request must follow the Conventional Commits specification.

This convention helps to automatically generate release notes.

Use lowercase for consistency.

Example:

fix: empty instance pop up

Refs: IA-3665

Note that the Jira reference is preceded by a line break.

Both the line break and the Jira reference are entered in the Add an optional extended description… field.

@tdethier tdethier self-assigned this Feb 3, 2025
@tdethier tdethier added the enhancement New feature or request label Feb 3, 2025
Copy link
Member

@quang-le quang-le left a comment

Choose a reason for hiding this comment

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

we need to deactivate the sub-activities tab if the user switch scope type (round/campaign) until the change has been saved. Otherwise it will make the UI confusing.
It's not ideal, but it's the cleanest stop gap measure

@@ -76,7 +76,7 @@
"iaso.polio.campaign.form": "Form",
"iaso.polio.campaign.initial_org_unit": "Org Unit",
"iaso.polio.campaign.key": "Key",
"iaso.polio.campaign.label.scopesWillBeDeleted": "The previous scopes will be deleted",
"iaso.polio.campaign.label.scopesWillBeDeleted": "The previous scopes will be deleted (sub-activity ones included)",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"iaso.polio.campaign.label.scopesWillBeDeleted": "The previous scopes will be deleted (sub-activity ones included)",
"iaso.polio.campaign.label.scopesWillBeDeleted": "The previous scopes will be deleted (sub-activities included)",

Copy link
Member

Choose a reason for hiding this comment

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

I would rather put that code in api/campaigns/services, so all the campaign related code is located together. Not sure if we had a definitive decision about that in the guidelines yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants