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

[MODFISTO - 501] - Implement endpoint to save FY finance data in bulk #439

Merged
merged 13 commits into from
Nov 29, 2024

Conversation

azizbekxm
Copy link
Contributor

@azizbekxm azizbekxm commented Nov 28, 2024

Purpose

https://folio-org.atlassian.net/browse/MODFISTO-501

Approach

  • Implemented API to update finance data as a bulk
  • Implemented API details
  • Added tests

@azizbekxm azizbekxm requested a review from a team November 28, 2024 12:14
String fullBudgetTableName = getFullTableName(conn.getTenantId(), BUDGET_TABLE);
String fullFYTableName = getFullTableName(conn.getTenantId(), FISCAL_YEAR_TABLE);

String sql = "UPDATE " + fullBudgetTableName + " SET jsonb = jsonb_set(jsonb,'{budgetStatus}', $1) " +
Copy link
Contributor

Choose a reason for hiding this comment

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

Would probably be better to move to a static variable and use via .formatted()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, moved to static variabla, thanks

if (event.result() != null) {
promise.complete(event.result().getFundStatus() != fund.getFundStatus());
fundService.updateFund(fund, new RequestContext(vertxContext, okapiHeaders))
.onComplete(result -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

onSuccess and onFailure can be used, easier to read

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, refactored

@Saba-Zedginidze-EPAM
Copy link
Contributor

Also sonar issue for unused import can be addressed

@azizbekxm azizbekxm merged commit 11f3013 into master Nov 29, 2024
10 checks passed
@azizbekxm azizbekxm deleted the MODFISTO-501 branch November 29, 2024 14:16
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.

4 participants