Copia Widget "Nuovi Ticket"

Post Reply
d22mauro
Znuny newbie
Posts: 4
Joined: 17 Nov 2025, 15:37
Znuny Version: 6.5.11
Real Name: Mauro

Copia Widget "Nuovi Ticket"

Post by d22mauro »

Ciao a tutti, è il mio primo post, mi chiamo Mauro.
Sto utilizzando la versione 6.5.11 di Znuny, con Docker.
Ho googlato e fatto diverse ricerche in merito alla mia esigenza, ma non ho trovato nulla di "completo" e non sono ancora riuscito ad ottenere il risultato che desidero.
La mia esigenza è quella di "duplicare" il Widget "Nuovi Ticket" nella dashboard principale degli operatori.
Devo gestire più code, e tramite il "filtro per coda" presente nel widget, vorrei avere un Widget che mi presenta "solo" i ticket di una coda, ed un secondo widget che mi presenta "solo" i ticket dell'altra coda.
Ho letto che basta creare un nuovo file .xml con il contenuto xml del nuovo widget, duplicando quello di default e cambiandogli solo il numero di indice.
Ho quindi creato un nuovo file "SecondoWidget.xml" e posizionato nel percorso "/opt/otrs/Kernel/Config/Files/XML", così composto:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="2.0" init="Application">
    <Setting Name="DashboardBackend###0122-SecondTicketNew" Required="0" Valid="1">
        <Description Translatable="1">Parameters for the dashboard backend of the new tickets overview of the agent interface. "Limit" is the number of entries shown by default. "Group" is used to restrict the access to the plugin (e. g. Group: admin;group1;group2;). "Default" determines if the plugin is enabled by default or if the user needs to enable it manually. "CacheTTLLocal" is the cache time in minutes for the plugin. "Mandatory" determines if the plugin is always shown and can not be removed by agents. Note: Only Ticket attributes and Dynamic Fields (DynamicField_NameX) are allowed for DefaultColumns.</Description>
        <Navigation>Frontend::Agent::View::Dashboard</Navigation>
        <Value>
            <Hash>
                <Item Key="Module">Kernel::Output::HTML::Dashboard::TicketGeneric</Item>
                <Item Key="Title" Translatable="1">Second New Tickets</Item>
                <Item Key="Description" Translatable="1">All new tickets, these tickets have not been worked on yet</Item>
                <Item Key="Attributes">StateType=new;</Item>
                <Item Key="Filter" Translatable="1">All</Item>
                <Item Key="Time">Age</Item>
                <Item Key="Limit">10</Item>
                <Item Key="Permission">rw</Item>
                <Item Key="Block">ContentLarge</Item>
                <Item Key="Group"></Item>
                <Item Key="Default">1</Item>
                <Item Key="CacheTTLLocal">0.5</Item>
                <Item Key="DefaultColumns">
                    <Hash>
                        <DefaultItem ValueType="Select">
                            <Item ValueType="Option" Value="0" Translatable="1">0 - Disabled</Item>
                            <Item ValueType="Option" Value="1" Translatable="1">1 - Available</Item>
                            <Item ValueType="Option" Value="2" Translatable="1">2 - Enabled by default</Item>
                        </DefaultItem>
                        <Item Key="Age" SelectedID="2"></Item>
                        <Item Key="Changed" SelectedID="1"></Item>
                        <Item Key="Created" SelectedID="1"></Item>
                        <Item Key="CustomerCompanyName" SelectedID="1"></Item>
                        <Item Key="CustomerID" SelectedID="1"></Item>
                        <Item Key="CustomerName" SelectedID="1"></Item>
                        <Item Key="CustomerUserID" SelectedID="1"></Item>
                        <Item Key="EscalationResponseTime" SelectedID="1"></Item>
                        <Item Key="EscalationSolutionTime" SelectedID="1"></Item>
                        <Item Key="EscalationTime" SelectedID="1"></Item>
                        <Item Key="EscalationUpdateTime" SelectedID="1"></Item>
                        <Item Key="TicketNumber" SelectedID="2"></Item>
                        <Item Key="Lock" SelectedID="1"></Item>
                        <Item Key="Owner" SelectedID="1"></Item>
                        <Item Key="PendingTime" SelectedID="1"></Item>
                        <Item Key="Queue" SelectedID="1"></Item>
                        <Item Key="Responsible" SelectedID="1"></Item>
                        <Item Key="Priority" SelectedID="1"></Item>
                        <Item Key="Service" SelectedID="1"></Item>
                        <Item Key="State" SelectedID="1"></Item>
                        <Item Key="SLA" SelectedID="1"></Item>
                        <Item Key="Title" SelectedID="2"></Item>
                        <Item Key="Type" SelectedID="1"></Item>
                    </Hash>
                </Item>
                <Item Key="Mandatory">0</Item>
            </Hash>
        </Value>
    </Setting>
</otrs_config>

Anche se riavvio Znuny però, non mi compare la possibilità di abilitare il nuovo Widget, ne in Sysconfig (DashboardBackend##) ne nella Dashboard come flag su eventuali nuovi Widget (mi aspetterei una nuova riga con titolo "Second New Tickets").
E' corretta la procedura?
Cosa manca?
Grazie fin d'ora.
Mauro.
d22mauro
Znuny newbie
Posts: 4
Joined: 17 Nov 2025, 15:37
Znuny Version: 6.5.11
Real Name: Mauro

Re: Copia Widget "Nuovi Ticket"

Post by d22mauro »

Ciao.
Dopo aver atteso un po di tempo, mi rispondo da solo a questa richiesta in modo tale che possa essere utile ad altri nella mia situazione.

In questo post
l'utente fasiha ha una esigenza simile alla mia.
Gli viene quindi consigliato di eseguire il comando

Code: Select all

/opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild
In effetti è proprio questo comando che attiva le modifiche immesse con il nuovo file XML.
Nel mio caso il comando completo è sato:

Code: Select all

su -c "/opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild" -s /bin/bash otrs

(è infatti da eseguire come utente "otrs")

In un'altro post
dove si parla del comando "Rebulid", un'altro utente ci tranquillizza su ciò che il comando esegue:
if you're paranoid, back up the Kernel/Config/Files/* before running the command. But it won't touch your custom configurations.
Eseguite queste ultime operazioni, ho il mio nuovo widget in dashboard, per tutti gli utenti. Di default è "Attivo".

Grazie.
Mauro.
Post Reply