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

GET /api/regions/active #229

Open
AleksandrMolchagin opened this issue Jun 13, 2024 · 1 comment
Open

GET /api/regions/active #229

AleksandrMolchagin opened this issue Jun 13, 2024 · 1 comment
Assignees
Labels
Critical/Blocking blocking a release or development enhancement New feature or request

Comments

@AleksandrMolchagin
Copy link
Member

AleksandrMolchagin commented Jun 13, 2024

Description

Some regions in the enrollment flows are not active or valid and should not appear in any selector. We need a new endpoint to return only active regions.

Possible strategy

1) Retrieve all TeamSeasons
2) Filter TeamSeasons based on their start date (to determine whether they are active or not)
3) Get regions through the following relation Team_Season__r.Team__r.School_Site__r.Region__c

Endpoint: GET /api/regions/active

Response:

{
  ["Region 1", "Region 2", "Region 3"]
}

~~

@AleksandrMolchagin AleksandrMolchagin added Critical/Blocking blocking a release or development enhancement New feature or request labels Jun 13, 2024
@AleksandrMolchagin AleksandrMolchagin self-assigned this Jun 13, 2024
@AleksandrMolchagin
Copy link
Member Author

All active regions will be retrieved through the following query:

SELECT Id, Value, Label, DurableId, EntityParticleId, ValidFor, IsActive FROM PicklistValueInfo WHERE EntityParticle.EntityDefinition.QualifiedApiName = 'Account' AND EntityParticle.QualifiedApiName = 'Region__c' AND isActive = TRUE

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

When branches are created from issues, their pull requests are automatically linked.

1 participant