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

✨ HPC-8267: Introduce getProjectBudgetsByOrgAndCluster #67

Merged
merged 2 commits into from
Dec 2, 2021
Merged

Conversation

s0
Copy link
Contributor

@s0 s0 commented Dec 2, 2021

Supports https://github.com/UN-OCHA/hpc_service/pull/2514

This is an up-to-date implementation of getProjectBudgetsByOrg from
hpc_service, which uses all the latest coding practices for the project.

Once this has been merged and is usable, getProjectBudgetsByOrg will be updated in https://github.com/UN-OCHA/hpc_service/pull/2514 to be implemented using this new function.

s0 added 2 commits December 2, 2021 19:28
This is an up-to-date implementation of getProjectBudgetsByOrg from
hpc_service, which uses all the latest coding practices for the project.

Once this has been merged and is usable, getProjectBudgetsByOrg will be
updated to be implemented using this new function.
@s0 s0 requested a review from a team as a code owner December 2, 2021 19:30
@s0 s0 assigned czmj and Pl217 Dec 2, 2021
@s0 s0 added the ready for review All comments have been addressed, and the Pull Request is ready for review label Dec 2, 2021
const segments = segmentsByProjectVersion.get(p.projectVersion.id);

// Handle $0 projects with no budget segments
if (!segments && p.projectVersion.currentRequestedFunds === '0') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Too bad we aren't ready to use BigInt here and also below where you do if (sum.toString() !== p.projectVersion.currentRequestedFunds). We cannot even convert p.projectVersion.currentRequestedFunds into BigInt, because we cannot compare to 0n literal, since our compilation target is lower than ES2020.

@Pl217 Pl217 merged commit ae1e1c0 into develop Dec 2, 2021
@Pl217 Pl217 deleted the HPC-8267 branch December 2, 2021 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review All comments have been addressed, and the Pull Request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants