Submission form will now exit with an error if the product set in the settings doesn't exist on the Bugzilla server.

This commit is contained in:
Jamie Greunbaum 2023-03-24 17:45:03 -04:00
parent d2cb047651
commit 4f3236e51e
2 changed files with 28 additions and 18 deletions

View File

@ -297,7 +297,6 @@ void UBugSubmissionForm::ServerProductInfoResponse(FHttpRequestPtr Request, FHtt
this->VersionsList.Add(VersionData.name); this->VersionsList.Add(VersionData.name);
} }
} }
}
if (this->VersionsList.Contains(GetGameVersion())) if (this->VersionsList.Contains(GetGameVersion()))
{ {
@ -318,6 +317,15 @@ void UBugSubmissionForm::ServerProductInfoResponse(FHttpRequestPtr Request, FHtt
this->CheckIfAllInitialResponsesAreIn(); this->CheckIfAllInitialResponsesAreIn();
} }
else
{
this->ProcessingRequestErrorButton->OnClicked().AddUObject(this, &UBugSubmissionForm::CancelForm);
FStringFormatOrderedArguments Args;
Args.Add(FStringFormatArg(GetDefault<UUnrealzillaGlobalSettings>()->ProductName));
this->ShowProcessingOverlayMessage(FString::Format(TEXT("Could not find data for a product called {0}"), Args));
}
}
} }
else else
{ {

View File

@ -282,6 +282,8 @@ protected:
TObjectPtr<class UVerticalBox> ProcessingRequestErrorBox; TObjectPtr<class UVerticalBox> ProcessingRequestErrorBox;
UPROPERTY(BlueprintReadOnly, meta=(BindWidget)) UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
TObjectPtr<class UCommonTextBlock> ProcessingRequestErrorText; TObjectPtr<class UCommonTextBlock> ProcessingRequestErrorText;
UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
TObjectPtr<class UCommonButtonBase> ProcessingRequestErrorButton;
UPROPERTY(BlueprintReadOnly) UPROPERTY(BlueprintReadOnly)
TArray<FString> VersionsList; TArray<FString> VersionsList;