Show only customer relevant data options in ticket

Hi,
does anyone know if it is possible to filter “object_manager_attributes” or “objects” in general per Customer. For example, i´ve created the following object_manager_attribute:

{
    "name": "customer_machines_2",
    "object":"Ticket",
    "display": "Customer Machines 2",
    "active": true,
    "data_type": "multi_tree_select",
    "data_option": {
        "options": [
            {
                "name": "Cust_ID_123",
                "value": "Cust_ID_123",
                "children": [
                    {
                        "name": "Contract_ID_123",
                        "value": "Cust_ID_123::Contract_ID_123",
                        "children": [
                            {
                                "name": "Machine_ID_123",
                                "value": "Cust_ID_123::Contract_ID_123::Machine_ID_123"
                            },
                            {
                                "name": "Machine_ID_456",
                                "value": "Cust_ID_123::Contract_ID_123::Machine_ID_456"
                            },
                            {
                                "name": "Machine_ID_789",
                                "value": "Cust_ID_123::Contract_ID_123::Machine_ID_789"
                            }
                        ]
                    }
                ]
            }
        ],
        "default": null,
        "null": true,
        "relation": "",
        "multiple": true
    }
}

The problem with this approach is, we have over 40k customers, the dropdown menu would be ridiculously large.
Is it somehow possible that only the contracts and machines are displayed that belong to the respective customer on the ticket?

Thanks for any advice in advance

@edit Json formatted
@edit renamed title for better clarity

Hi @intothi

you are looking for a “Single tree selection field”: Object types — Zammad documentation

See an example here:

But I have no idea what happens, when you put in 40.000 customers, 40k+ contracts und even more machines. I would expect, that the UI might get a bit slow.

Cheers,
Gijs

Hi, @ecomsilio thanks for your reply.

I Think you proposed the same idea, i already proposed in my initial post.
The only difference I can see, is you used “Single tree selection field” where i used “Multiple tree selection field”.
And that does not solve my problem.

The problem remains, I would like to display only the machines and contracts that are relevant to the ticket’s customer.

Cheers
Intothi

Hi Intothi

you’re right. Sorry, I didn’t saw that because of the “flat” formatted json.

I don’t really have a solution. Maybe only a custom AddOn. But that is nothing I can support you with.

Gijs

True, the json could have been read better if formatted.

But I’m glad you got the same idea as I did. So I was not completely wrong with my idea.

I had already feared that it only works with a separate addon.
Maybe someone else has an idea how the desired behavior can be realized in a simple way.

In any case, thanks for the suggestion

Cheers
Intothi

1 Like

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.