diff --git a/CHANGELOG.md b/CHANGELOG.md index ecedd51..d4783f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [unreleased] - + +### Fixed + +- Fix possibility to set 0 credit used when adding a follow-up, a task, or a solution + ## [1.15.2] - 2025-12-22 ### Fixed diff --git a/templates/tickets/consume.html.twig b/templates/tickets/consume.html.twig index e9dd2a5..891e92e 100644 --- a/templates/tickets/consume.html.twig +++ b/templates/tickets/consume.html.twig @@ -67,13 +67,13 @@ {{ fields.numberField( 'plugin_credit_quantity', - 0, + 1, __('Quantity consumed', 'credit'), { 'entity': entity_id, 'condition': condition, 'max': default_credit_max, - 'min': 0, + 'min': 1, 'helper': __('Maximum consumable quantity', 'credit') ~ ' : ' ~ default_credit_max, 'field_class': 'col-6 col-sm-6', 'input_class': 'col-xxl-5', diff --git a/templates/tickets/form.html.twig b/templates/tickets/form.html.twig index b9a3ac3..8afdb60 100644 --- a/templates/tickets/form.html.twig +++ b/templates/tickets/form.html.twig @@ -56,13 +56,12 @@ {{ fields.numberField( 'plugin_credit_quantity', - 0, + 1, __('Quantity consumed', 'credit'), { 'entity': entity_id, 'condition': conditions, - 'max': 0, - 'min': 0, + 'min': 1, 'field_class': 'col-4 col-sm-4', 'helper': __('Maximum consumable quantity', 'credit') ~ ' : 0 ', }