Announcement

Collapse
No announcement yet.

Cases status field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • minbar
    replied
    That's what I did, nice to have confirmation that I did the right thing..

    Leave a comment:


  • telecastg
    commented on 's reply
    You're welcome

    Not sure if it's redundant, but don't forget to add the new status first to the array "options" so you can choose it and then to the array "notActualOptions" so the filter "Open" will recognize it as 'Not Open".

  • minbar
    replied
    Perfect, thanks again!

    Leave a comment:


  • telecastg
    replied
    You're welcome minbar

    Yes, if you create a 'Close Unresolved" status and also add it to the Not Actual Options, the filter "Open" will discard any Case with that status.
    Last edited by telecastg; 07-26-2021, 02:30 PM.

    Leave a comment:


  • minbar
    replied
    telecastg Brilliant, many thanks for the detailed answer!

    So I want to create a status of ‘Close Unresolved’ and based on what you said I will need to add that status to Not Actual Options so that the system knows it’s a ‘closed’ status right?

    Leave a comment:


  • telecastg
    replied
    It is an array containing values to be used as "different from" definition for filtering purposes..... for example:

    In script application/Espo/Modules/Crm/SelectManagers/CaseObj.php
    Code:
    namespace Espo\Modules\Crm\SelectManagers;
    
    class CaseObj extends \Espo\Core\Select\SelectManager
    {
        protected function boolFilterOpen(&$result)
        {
            return [
                'status!=' => $this->getMetadata()->get(['entityDefs', $this->entityType, 'fields', 'status', 'notActualOptions']) ?? []
            ];
        }
    
        protected function filterOpen(&$result)
        {
            $result['whereClause'][] = [
                'status!=' => $this->getMetadata()->get(['entityDefs', $this->entityType, 'fields', 'status', 'notActualOptions']) ?? []
            ];
        }
    
        protected function filterClosed(&$result)
        {
            $result['whereClause'][] = [
                'status' => 'Closed'
            ];
        }
    }
    application/Espo/Modules/Crm/Resources/metadata/entityDefs/Case.json
    Code:
    "fields" {
        ....
    
        "status": {
            "type": "enum",
            "options": ["New", "Assigned", "Pending", "Closed", "Rejected", "Duplicate"],
            "default": "New",
            "style": {
                "Closed": "success",
                "Duplicate": "danger",
                "Rejected": "danger"
            },
            "audited": true,
            "fieldManagerAdditionalParamList": [
                {
                    "name": "notActualOptions",
                    "view": "views/admin/field-manager/fields/not-actual-options"
                }
            ],
            "notActualOptions": ["Closed", "Rejected", "Duplicate"]
        },
    
        ...
    }
    a Case is considered "Open" if the status value of the record is NOT contained in the array ["Closed", "Rejected", "Duplicate"]
    Last edited by telecastg; 07-26-2021, 02:29 PM.

    Leave a comment:


  • minbar
    replied
    Originally posted by emillod View Post
    Ah, sorry, so you meant something different
    No problem, thanks for responding….

    Leave a comment:


  • emillod
    replied
    Ah, sorry, so you meant something different

    Leave a comment:


  • minbar
    replied
    Hi Maximus, sure…

    Leave a comment:


  • emillod
    replied
    Okay, you're talking about settings of entity, yes? There you can define status field - enum. And based on that you can for example group cases in kanban view

    Leave a comment:


  • Maximus
    replied
    Hi.
    Could you provide a screenshot of where do you see this?

    Leave a comment:


  • minbar
    started a topic Cases status field

    Cases status field

    Hi guys, quick question... In the Cases Status field the is a setting called 'Not Actual Options', can any one please tell me what it does?

    Many thanks..

    Gareth
Working...
X