Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.11.0-b2
-
Component/s: None
-
Labels:None
Description
Currently option values must be unique, but it would be nice to be able to disable an option and replace it with a new one with the same price to replace it while keeping current users on the old price.
In app/models/package_options.php around line 2271 change
private function validateUniqueValues($values) { $option_values = []; foreach ((array)$values as $index => $value) { if (isset($value['value']) && !isset($option_values[$value['value']])) { $option_values[$value['value']] = $value['value']; } } return count($option_values) === count((array)$values); }
To
private function validateUniqueValues($values) { $option_values = []; foreach ((array)$values as $index => $value) { if (($value['status'] ?? null) == 'inactive') { unset($values[$index]); } if (isset($value['value']) && !isset($option_values[$value['value']])) { $option_values[$value['value']] = $value['value']; } } return count($option_values) === count((array)$values); }
Activity
Jonathan Reissmueller
created issue -
Jonathan Reissmueller
made changes -
Field | Original Value | New Value |
---|---|---|
Sprint | 5.11.0 Sprint 7 [ 207 ] |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Rank | Ranked lower |
Abdy Franco
made changes -
Assignee | Abdy Franco [ abdy ] |
Abdy Franco
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Abdy Franco
made changes -
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 12 minutes [ 720 ] | |
Worklog Id | 17492 [ 17492 ] |
Abdy Franco
made changes -
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Jonathan Reissmueller
made changes -
Status | In Review [ 5 ] | Closed [ 6 ] |