-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Which component is this issue related to?
Umbraco Commerce (Core)
Which Umbraco Commerce version are you using? (Please write the exact version, example: 10.1.0)
16.3.1
Bug summary
I am creating a custom OrderLineDiscountRuleProviderBase, and adding custom settings using the DiscountRuleProviderSetting attribute. I am able to add all related properties to the attribute (label, description, editor ui alias), but on the front end it seems the setting always renders the description with the same text as the label.
Specifics
This is a snippet of the discount rule provider:
`
[DiscountRuleProvider("customRule",
Label = "Custom Rule",
Description = "Custom description")]
public class CustomDiscountRuleProvider : OrderLineDiscountRuleProviderBase
{
private readonly IProductContentService _productContentService;
public CustomDiscountRuleProvider(UmbracoCommerceContext ctx) : base(ctx)
{}
public override DiscountRuleResult ValidateRule(DiscountRuleContext ctx, CustomDiscountRuleProvider settings)
{
// ...
}
}
public class CustomSettings
{
[DiscountRuleProviderSetting(
Key = "settingKey",
Label = "Setting Label",
Description = "Setting Description")]
public string? SettingValue { get; set; }
}
`
The description of the DiscountRuleProviderSetting attribute seems to not work:

Steps to reproduce
Create a new OrderLineDiscountRuleProviderBase, add the settings object with a property decorated with the attribute DiscountRuleProviderSetting, adding a label and description (different from the label) to the attribute.
Go to the backoffice and add a discount using the new discount rule.
Check the discount rule configuration shows the setting property with the same label and description.
Expected result / actual result
It should render the label "Setting Label" and the description "Setting Description", but it renders both the label and description as "Setting Label"
Dependencies
No response