After a product's entitlement set is cleared, extending a grant of it fails with "Failed to save the grant" and no reason #273

Open
opened 2026-10-26 20:58:23 +00:00 by cgalo5758 · 0 comments
Owner

What happens

Some terms first. A grant is an operator's record that gives an organization a product without payment, optionally until an end date. An entitlement set is what a product delivers. Manage, on a grant's row on the organization page, changes the grant's end date; moving the end date of a grant that delivers issues an extension, which confers the product again (ExtendGrantTx, internal/entitlements/grant_acts.go:108-215, the conferral at :182-193; docs/models/entitlements.md:51).

The product edit form lets an operator set a product's entitlement set to "None" while a grant delivers the product (UpdateProduct, internal/server/operator_products.go:332-338). The grant keeps delivering, because a delivery keeps the set it was conferred with (docs/models/product-catalog.md:53). The conferral refuses a product with no set (internal/db/migrations/00023_grant_resumption.sql:447-449), so every later extension of that grant fails. Manage answers "Failed to save the grant. Details are in the server logs." (internal/server/operator_enrollment.go:1094-1095), and only the log names the cause: "confer: product … has no entitlement set and confers nothing". Nothing on the grant's row or the product page says the grant can no longer be extended. The grant form leaves out products with no set (internal/server/operator_enrollment.go:1998), so no new grant of the product can be issued either, and the grant ends at its old date.

On the same path a retired product, the other product state the conferral refuses, gets a sentence of its own: "… is retired, so the change was refused." (internal/server/operator_enrollment.go:1059-1069).

The change planned for #153 refuses clearing the set of a product that is a ladder tier; this case is a product that is a tier of no ladder. Related: #155.

What should happen

The operator learns the cause before or when the extension fails: Manage refuses it with a sentence that names the missing entitlement set, as it does for a retired product, or the product edit refuses clearing the set while a grant delivers the product.

Where

internal/server/operator_enrollment.go:1094-1095 (the generic failure in ManageGrant); internal/entitlements/grant_acts.go:182-193; internal/server/operator_products.go:332-338.

Steps

  1. Issue a grant, with an end date, of a product that is a tier of no ladder.
  2. Edit the product, set Entitlement set to None, and save.
  3. On the organization's page, open Manage on the grant, move Valid until later, and save.
  4. The page answers "Failed to save the grant. Details are in the server logs."

Why it matters

An operator cannot extend a grant a member relies on and is not told why, so the member's delivery ends at the old date.

### What happens Some terms first. A grant is an operator's record that gives an organization a product without payment, optionally until an end date. An entitlement set is what a product delivers. Manage, on a grant's row on the organization page, changes the grant's end date; moving the end date of a grant that delivers issues an extension, which confers the product again (`ExtendGrantTx`, `internal/entitlements/grant_acts.go:108-215`, the conferral at `:182-193`; `docs/models/entitlements.md:51`). The product edit form lets an operator set a product's entitlement set to "None" while a grant delivers the product (`UpdateProduct`, `internal/server/operator_products.go:332-338`). The grant keeps delivering, because a delivery keeps the set it was conferred with (`docs/models/product-catalog.md:53`). The conferral refuses a product with no set (`internal/db/migrations/00023_grant_resumption.sql:447-449`), so every later extension of that grant fails. Manage answers "Failed to save the grant. Details are in the server logs." (`internal/server/operator_enrollment.go:1094-1095`), and only the log names the cause: "confer: product … has no entitlement set and confers nothing". Nothing on the grant's row or the product page says the grant can no longer be extended. The grant form leaves out products with no set (`internal/server/operator_enrollment.go:1998`), so no new grant of the product can be issued either, and the grant ends at its old date. On the same path a retired product, the other product state the conferral refuses, gets a sentence of its own: "… is retired, so the change was refused." (`internal/server/operator_enrollment.go:1059-1069`). The change planned for #153 refuses clearing the set of a product that is a ladder tier; this case is a product that is a tier of no ladder. Related: #155. ### What should happen The operator learns the cause before or when the extension fails: Manage refuses it with a sentence that names the missing entitlement set, as it does for a retired product, or the product edit refuses clearing the set while a grant delivers the product. ### Where `internal/server/operator_enrollment.go:1094-1095` (the generic failure in `ManageGrant`); `internal/entitlements/grant_acts.go:182-193`; `internal/server/operator_products.go:332-338`. ### Steps 1. Issue a grant, with an end date, of a product that is a tier of no ladder. 2. Edit the product, set Entitlement set to None, and save. 3. On the organization's page, open Manage on the grant, move Valid until later, and save. 4. The page answers "Failed to save the grant. Details are in the server logs." ### Why it matters An operator cannot extend a grant a member relies on and is not told why, so the member's delivery ends at the old date.
cgalo5758 added the
kind
bug
area/entitlementsarea/catalogarea/operator-ui
labels 2026-10-26 20:58:23 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#273