The default change's success toast named the type by its key, as in "Default change committed for personal: 4 migrated.", while the org types page heads the same card "Personal" and the reorder's toast names the types it reaches by their display names (#187). CommitOrgTypeDefaultChange passes the display name from the type it already reads to render the card, and falls back to the key only if the name is empty. A handler test asserts the display name and the absence of the key. The 18 plan-act goldens that carry the toast change only in that line. The full suite passes.
106 lines
4.2 KiB
JSON
106 lines
4.2 KiB
JSON
{
|
|
"answer": [
|
|
"status 200",
|
|
"Hx-Trigger showSuccessToast: Default change committed for T: 1 migrated."
|
|
],
|
|
"checked": [],
|
|
"logs": [],
|
|
"statements": [
|
|
"begin",
|
|
"SET LOCAL lock_timeout = '5s'",
|
|
"SELECT pg_advisory_xact_lock(hashtextextended($1, 0))",
|
|
"LockOrgType",
|
|
"UpdateOrgTypeDefaultPlanLadder",
|
|
"RecordPlanAct",
|
|
"commit",
|
|
"begin",
|
|
"SET LOCAL transaction_timeout = '2s'",
|
|
"SET LOCAL lock_timeout = '500ms'",
|
|
"SELECT pg_advisory_xact_lock_shared(hashtextextended($1, 0))",
|
|
"WritePlanActObligations",
|
|
"commit",
|
|
"begin",
|
|
"SET LOCAL transaction_timeout = '2s'",
|
|
"SET LOCAL lock_timeout = '500ms'",
|
|
"SELECT pg_advisory_xact_lock_shared(hashtextextended($1, 0))",
|
|
"LockResourcePool",
|
|
"LockPlanActObligation",
|
|
"SELECT core.end_conferral($1, $2, $3, $4, $5, $6, $7, $8)",
|
|
"CreateGrant",
|
|
"SELECT provision_id, outcome FROM core.confer($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)",
|
|
"SELECT core.assert_rendezvous(false)",
|
|
"DeleteContributionsByProvisionID",
|
|
"CreateNumericEntitlementContribution",
|
|
"UpdateNumericEntitlementLimit",
|
|
"SELECT core.assert_rendezvous(false)",
|
|
"DeleteContributionsByProvisionID",
|
|
"CreateNumericEntitlementContribution",
|
|
"UpdateNumericEntitlementLimit",
|
|
"SettlePlanActObligation",
|
|
"commit",
|
|
"HasPlanActSettledOutgoing",
|
|
"begin",
|
|
"SET LOCAL transaction_timeout = '2s'",
|
|
"SET LOCAL lock_timeout = '500ms'",
|
|
"SELECT pg_advisory_xact_lock_shared(hashtextextended($1, 0))",
|
|
"commit",
|
|
"begin isolation level repeatable read read only",
|
|
"commit"
|
|
],
|
|
"rows": {
|
|
"tiers": [
|
|
"ladder | rank | product",
|
|
"<ladder:Main> | 0 | <product:Basic>",
|
|
"<ladder:Next> | 0 | <product:Gold>"
|
|
],
|
|
"defaults": [
|
|
"org_type | default_ladder",
|
|
"<orgtype:T> | <ladder:Next>"
|
|
],
|
|
"grants": [
|
|
"grant_id | org | product | grant_reason | granted_by | extends | description | status | act",
|
|
"<uuid:1> | <org:Holder> | <product:Basic> | default | none | none | | active | none",
|
|
"<uuid:2> | <org:Holder> | <product:Gold> | default | none | none | | active | <act:1>"
|
|
],
|
|
"provisions": [
|
|
"provision | pool | grant_id | status",
|
|
"<uuid:3> | <pool:Holder> | <uuid:1> | ended",
|
|
"<uuid:4> | <pool:Holder> | <uuid:2> | active"
|
|
],
|
|
"positions": [
|
|
"provision | ladder | product | status | ended",
|
|
"<uuid:3> | <ladder:Main> | <product:Basic> | ended | true",
|
|
"<uuid:4> | <ladder:Next> | <product:Gold> | active | false"
|
|
],
|
|
"transitions": [
|
|
"pool | provision | ladder | from_rank | to_rank | transition_type | actor_type | actor | reason",
|
|
"<pool:Holder> | <uuid:3> | <ladder:Main> | - | 0 | initiate | system | none | test fixture",
|
|
"<pool:Holder> | <uuid:3> | <ladder:Main> | 0 | - | end | operator | <person:Operator> | org-type default change (<orgtype:T>): migrated off the outgoing default",
|
|
"<pool:Holder> | <uuid:4> | <ladder:Next> | - | 0 | initiate | operator | <person:Operator> | org-type default change (<orgtype:T>)"
|
|
],
|
|
"entitlements": [
|
|
"pool | resource_key | resource_limit",
|
|
"<pool:Holder> | plan_golden_seats | 5"
|
|
],
|
|
"acts": [
|
|
"act | cause | actor_type | actor | note | request_id",
|
|
"<act:1> | org_type_default_changed | person | <person:Operator> | none | <uuid:5>"
|
|
],
|
|
"act_details": [
|
|
"act | cause | ladder | ladder_name | product | product_name | previous_product | previous_product_name | org_type | org_type_name | previous_ladder | previous_ladder_name | disposition | retried",
|
|
"<act:1> | org_type_default_changed | <ladder:Next> | Next | <product:Gold> | Gold | none | none | <orgtype:T> | T | <ladder:Main> | Main | migrate | none"
|
|
],
|
|
"reached_org_types": [
|
|
"act | org_type | org_type_name | last_org",
|
|
"<act:1> | <orgtype:T> | T | <org:Holder>"
|
|
],
|
|
"orgs_without_pool": [
|
|
"act | org_type | org"
|
|
],
|
|
"obligations": [
|
|
"act | org_type | org | pool | status | outcome | attempts | error_step | superseded_by | requeued_by",
|
|
"<act:1> | <orgtype:T> | <org:Holder> | <pool:Holder> | settled | migrated | 0 | none | none | none"
|
|
]
|
|
}
|
|
}
|