Ash calculation that exposes :severity (atom) on a resource carrying an action name — every
paper-trailed version resource, and the event logs the activity timeline draws. Delegates to
MishkaCmsCore.Activity.Helpers.severity_for/1 so the same mapping is used in the live broadcast
path and in the unified log's SQL.
Wire it from each PaperTrail mixin's calculations block:
calculate :severity, :atom,
MishkaCmsCore.Activity.Calculations.Severity:field names the attribute holding the action, for a resource that calls it something other than
a version's :version_action_name:
calculate :severity, :atom,
{MishkaCmsCore.Activity.Calculations.Severity, field: :action}
Summary
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.load/3.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.load/3.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.