Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 926
    • Issues 926
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #1451

Closed
Open
Opened Dec 06, 2019 by DaveD@DaveDDeveloper

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:

  1. 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.)
  2. And to disable the stock types there's no dropdown option you have to go in and edit the "enabled" field.
  3. After you disable a case type (stock or not), the dropdown action still says "Disable".

I'm thinking it's always been like this.

Edited Dec 06, 2019 by DaveD
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
5.24.0
Milestone
5.24.0
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#1451