Incorrect boolean comparisons in ang/crmCaseType/list.html for is_active and is_reserved
In the case type listing, the various actions available are determined by combinations of is_active and is_reserved. However in javascript:
var x = "0";
if (x) {console.log('true'); } else {console.log('false');}
x = "1";
if (x) {console.log('true'); } else {console.log('false');}
will output true for both. Similarly for !x
it will output false for both.
This comes up a couple ways:
- The stock case types can't be deleted. (It's probably always been assumed this was on purpose for a reason, that they are "special". I can't think why this would be true - there's nothing in core that references them except they get loaded automatically when you first enable civicase.)
- And to disable the stock types there's no dropdown option you have to go in and edit the "enabled" field.
- After you disable a case type (stock or not), the dropdown action still says "Disable".
I'm thinking it's always been like this.