fix(developers): fix application record creation and approval flow
All checks were successful
Build and Deploy / deploy (push) Successful in 18s

Fix two bugs preventing developer applications from appearing in SilverDESK:

1. Application creation payload used wrong types - ticketId was parsed as
   int (GetInt32) but SilverDESK expects a Guid string, and appliedRole
   was cast to int but the DTO expects "Tester"/"Developer" strings.

2. Approval provisioning now updates the DeveloperApplication record in
   SilverDESK after Mattermost/Mailcow provisioning, setting status to
   Approved and the correct provisioning flags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 19:40:42 +00:00
parent 324ce141d0
commit c4febd7036
2 changed files with 61 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ public class DeveloperApplicationService
{
var userId = authResult.GetProperty("user").GetProperty("id").GetString();
var ticketResult = await ticketResponse.Content.ReadFromJsonAsync<JsonElement>();
var ticketId = ticketResult.GetProperty("id").GetInt32();
var ticketId = ticketResult.GetProperty("id").GetString();
var applicationPayload = new
{
@@ -110,7 +110,7 @@ public class DeveloperApplicationService
email = application.Email,
desiredUsername = application.DesiredUsername,
timezone = application.Timezone,
appliedRole = (int)application.Role,
appliedRole = application.Role.ToString(),
platforms = application.Platforms,
skills = application.Skills ?? "",
motivation = application.Motivation,