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

[PAGOPA-2446] refactoring: Update status on-the-fly #273

Merged
merged 9 commits into from
Jan 13, 2025
Merged

Conversation

cap-ang
Copy link
Contributor

@cap-ang cap-ang commented Dec 2, 2024

List of Changes

TL;DR

  • validityCheckAndUpdate method has been added 🆕 -> It is used when Get and Pay Payment Option

  • expirationCheckAndUpdate method has been added 🆕 -> It is used only when Get Payment Option

  • Check on expiration or validity on report API has been removed 🗑️

These scenarios were refactored:

[GET PO by NAV scenario]

  • check validity (if published and now > validityDate) -> update
  • check expiration (if switchToExpired and valid and > now) -> update

[PAY scenario]

  • check validity (if published and now > validityDate) -> update
  • expiration check is useless (pay already done)

[INVALIDATE scenario]

  • check expiration because expired isn't an invalidable status
  • validity check is useless (both published and valid are invalidable status)

Motivation and Context

Refactoring status retrieve on the fly handling. Cron granularity differs from validityDate and dueDate granularity. These changes helps to update status on-the-fly.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@cap-ang cap-ang self-assigned this Dec 2, 2024
@cap-ang cap-ang requested a review from a team as a code owner December 2, 2024 19:08
…tPositionStatus.java

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Jan 9, 2025

This pull request does not contain a valid label. Please add one of the following labels: [major, minor, patch, patch, skip]

@cap-ang cap-ang added the patch label Jan 9, 2025
Copy link
Contributor

@pasqualespica pasqualespica left a comment

Choose a reason for hiding this comment

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

great work 🚀

@cap-ang cap-ang merged commit 7b1c3fc into main Jan 13, 2025
18 of 19 checks passed
@cap-ang cap-ang deleted the PAGOPA-2446 branch January 13, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants