Skip to content

[FIL-759] Enable reopening applications that have reached the total datacap using the previous approach. #275

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

Merged
merged 1 commit into from
May 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions fplus-lib/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3157,7 +3157,10 @@ impl LDNApplication {
))
})?;
return Err(LDNError::Load(information.to_string()));
} else if app_file.lifecycle.get_state() == AppState::TotalDatacapReached {
} else if app_file.lifecycle.get_state() == AppState::TotalDatacapReached
|| (app_file.lifecycle.get_state() == AppState::Granted
&& !app_file.lifecycle.is_active)
{
let new_requested_amount = parse_size_to_bytes(
&parsed_ldn.datacap.total_requested_amount,
)
Expand Down Expand Up @@ -3223,7 +3226,10 @@ impl LDNApplication {
let branch_name = LDNPullRequest::application_branch_name(&application_id);
let uuid = uuidv4::uuid::v4();

let pr_title = if app_file.lifecycle.get_state() == AppState::TotalDatacapReached {
let pr_title = if app_file.lifecycle.get_state() == AppState::TotalDatacapReached
|| (app_file.lifecycle.get_state() == AppState::Granted
&& !app_file.lifecycle.is_active)
{
format!("Reopen application for {}", parsed_ldn.client.name.clone())
} else {
format!("Issue modification for {}", parsed_ldn.client.name.clone())
Expand Down