client.get('ticketFields:identifier.optionGroups') return invalid option groups | Community
Skip to main content

client.get('ticketFields:identifier.optionGroups') return invalid option groups

  • August 11, 2025
  • 1 reply
  • 0 views

Leafworks12

Hi,

Here is my ticket field

{
...
  "custom_field_options": [
    {
      "id": 28680434333202,
      "name": "Category 1::Section::Article",
      "raw_name": "Category 1::Section::Article",
      "value": "category_1__section",
      "default": false
    },
    {
      "id": 28680434333330,
      "name": "Category 2::Section::FAQ",
      "raw_name": "Category 2::Section::FAQ",
      "value": "category_2__section",
      "default": false
    }
  ]
}

and result from client.get('ticketFields:identifier.optionGroups') 

{
  "hasOptions": true,
  "isRequired": false,
  "isVisible": true,
  "label": "Broken zafClient optionGroups",
  "name": "custom_field_28680420306322",
  "requiredOnStatuses": [],
  "type": "tagger",
  "isEnabled": true,
  "options": [
    {
      "value": "-",
      "isVisible": true,
      "isEnabled": true,
      "label": "-"
    },
    {
      "value": "Section",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 1::Section"
    },
    {
      "value": "category_1__section",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 1::Section::Article"
    },
    {
      "value": "Category 2",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 2"
    },
    {
      "value": "Category 2",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 2"
    },
    {
      "value": "Section",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 2::Section"
    },
    {
      "value": "category_2__section",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 2::Section::FAQ"
    }
  ],
  "optionValues": [
    {
      "value": "-",
      "isVisible": true,
      "isEnabled": true,
      "label": "-"
    },
    {
      "value": "category_1__section",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 1::Section::Article"
    },
    {
      "value": "category_2__section",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 2::Section::FAQ"
    }
  ],
  "optionGroups": [
    {
      "value": "Section",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 1::Section"
    },
    {
      "value": "Category 2",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 2"
    },
    {
      "value": "Section",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 2::Section"
    },
    {
      "value": "Category 2",
      "isVisible": true,
      "isEnabled": true,
      "label": "Category 2"
    }
  ]
}

optionsGroups are completely wrong when some levels have same labels. On example above you can see that there 2 Category 2 groups which makes it impossible to hide option groups correctly. 
Please help to fix it, because it broke our app for many clients who has complex dropdowns with multiple levels.

1 reply

Hi Andriy,
 
I'm able to replicate this in testing.  Our Apps Framework devs are investigating.  I also see that you have a ticket open about this.  We'll provide updates on the investigation there.