Hi Renee,
here are the *.xml files.
The
File: AgentMessageAdd.pm
Directory: /Custom/Kernel/Modules
is a copy of the file "AgentTicketPhone". The only changes are:
package Kernel::Modules::AgentMessageAdd;
...
# get output back
return $LayoutObject->Output(
TemplateFile => 'AgentMessageAdd',
Data => \%Param,
);
And the
file: AgentMessageAdd.tt
Directory: /Custom/Kernel/Output/HTML/Templates/Standard
is a none modified copy of AgentTicketPhone.tt
File: Messages.xml
Directory: /Kernel/Config/Files
Registration of the module:
<?xml version="1.0" encoding="utf-8"?>
<ConfigItem Name="Frontend::Module###AgentMessageAdd" Required="0" Valid="1">
<Description Translatable="1">Frontend module registration for the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::ModuleRegistration</SubGroup>
<Setting>
<FrontendModuleReg>
<Description Translatable="1">Create new messages.</Description>
<Title Translatable="1">NewMessage</Title>
<NavBarName>Messages</NavBarName>
<NavBar>
<Description Translatable="1">Create a new message.</Description>
<Name Translatable="1">NewMessage</Name>
<Link>Action=AgentMessageAdd</Link>
<LinkOption></LinkOption>
<NavBar>Messages</NavBar>
<Type></Type>
<Block></Block>
<AccessKey></AccessKey>
<Prio>100</Prio>
</NavBar>
<NavBar>
<Description Translatable="1"></Description>
<Type>Menu</Type>
<Block>ItemArea</Block>
<Name Translatable="1">Messages</Name>
<Link>Action=AgentMessageAdd</Link>
<LinkOption></LinkOption>
<NavBar>Messages</NavBar>
<AccessKey></AccessKey>
<Prio>300</Prio>
</NavBar>
<Loader>
<JavaScript>Core.Agent.CustomerSearch.js</JavaScript>
<JavaScript>Core.Agent.TicketAction.js</JavaScript>
</Loader>
</FrontendModuleReg>
</Setting>
</ConfigItem>
File: MessageConf.xml
Directory: /Kernel/Config/Files
Configuration of the mask
<?xml version="1.0" encoding="utf-8"?>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###Priority" Required="1" Valid="1">
<Description Translatable="1">Sets the default priority for new phone tickets in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<ValidateModule>Kernel::System::SysConfig::PriorityValidate</ValidateModule>
<Setting>
<String Regex="">3 normal</String>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###ArticleType" Required="1" Valid="1">
<Description Translatable="1">Sets the default article type for new phone tickets in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<String Regex="">phone</String>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###SenderType" Required="1" Valid="1">
<Description Translatable="1">Sets the default sender type for new phone ticket in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<String Regex="">customer</String>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd::CustomerIDReadOnly" Required="1" Valid="1">
<Description Translatable="1">Controls if CutomerID is editable in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<Option SelectedID="1">
<Item Key="0" Translatable="1">No</Item>
<Item Key="1" Translatable="1">Yes</Item>
</Option>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd::AllowMultipleFrom" Required="1" Valid="1">
<Description Translatable="1">Controls if more than one from entry can be set in the new phone ticket in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<Option SelectedID="0">
<Item Key="0" Translatable="1">No</Item>
<Item Key="1" Translatable="1">Yes</Item>
</Option>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###Subject" Required="1" Valid="1">
<Description Translatable="1">Sets the default subject for new phone tickets (e.g. 'Phone call') in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<String Regex=""></String>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###Body" Required="1" Valid="1">
<Description Translatable="1">Sets the default note text for new telephone tickets. E.g 'New ticket via call' in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<TextArea></TextArea>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###StateDefault" Required="1" Valid="1">
<Description Translatable="1">Sets the default next state for new phone tickets in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<ValidateModule>Kernel::System::SysConfig::StateValidate</ValidateModule>
<Setting>
<String Regex="">info</String>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###StateType" Required="1" Valid="1">
<Description Translatable="1">Determines the next possible ticket states, after the creation of a new phone ticket in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<Array>
<Item Translatable="1">open</Item>
<Item Translatable="1">info</Item>
</Array>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###HistoryType" Required="1" Valid="1">
<Description Translatable="1">Defines the history type for the phone ticket screen action, which gets used for ticket history in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<String Regex="">PhoneCallCustomer</String>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###HistoryComment" Required="1" Valid="1">
<Description Translatable="1">Defines the history comment for the phone ticket screen action, which gets used for ticket history in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<String Regex=""></String>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###SplitLinkType" Required="0" Valid="1">
<Description Translatable="1">Sets the default link type of splitted tickets in the agent interface.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<Hash>
<Item Key="LinkType" Translatable="1">ParentChild</Item>
<Item Key="Direction" Translatable="1">Target</Item>
</Hash>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###ServiceMandatory" Required="0" Valid="1">
<Description Translatable="1">Sets if service must be selected by the agent.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<Option SelectedID="0">
<Item Key="0" Translatable="1">No</Item>
<Item Key="1" Translatable="1">Yes</Item>
</Option>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###SLAMandatory" Required="0" Valid="1">
<Description Translatable="1">Sets if SLA must be selected by the agent.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<Option SelectedID="0">
<Item Key="0" Translatable="1">No</Item>
<Item Key="1" Translatable="1">Yes</Item>
</Option>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###DynamicField" Required="0" Valid="1">
<Description Translatable="1">Dynamic fields shown in the ticket phone screen of the agent interface. Possible settings: 0 = Disabled, 1 = Enabled, 2 = Enabled and required.</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<Hash>
</Hash>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###RichTextWidth" Required="0" Valid="1">
<Description Translatable="1">Defines the width for the rich text editor component for this screen. Enter number (pixels) or percent value (relative).</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<String Regex="^\d+%?$">620</String>
</Setting>
</ConfigItem>
<ConfigItem Name="Ticket::Frontend::AgentMessageAdd###RichTextHeight" Required="0" Valid="1">
<Description Translatable="1">Defines the height for the rich text editor component for this screen. Enter number (pixels) or percent value (relative).</Description>
<Group>Ticket</Group>
<SubGroup>Frontend::Agent::Ticket::ViewMessageNew</SubGroup>
<Setting>
<String Regex="^\d+%?$">320</String>
</Setting>
</ConfigItem>
Hi OTRS-developer,
to post internal messages for our agents, I tried to insert a new module called AgentMessageAdd. This messages should be displayed on dashboard in a new widget.
I achieved this goal on our OTRS 4-Instance.
So I did the following:
1.) Registration of the module
File: Message.xml
Directory: /Kernel/Config/Files
With this file I get the entry "Messages" into the menuBar and register the module.
This works!
2.) Configuration of the mask, to post a message
File: MessageConf.xml
Directory: /Kernel/Config/Files
After this, I can configurate the mask via SysConfig.
3.) Functionality
File: AgentMessageAdd.pm
Directory: /Custom/Kernel/Modules
This is a modified copy of file "AgentTicketPhone.pm".
Changes:
package Kernel::Modules::AgentMessageAdd;
...
# get output back
return $LayoutObject->Output(
TemplateFile => 'AgentMessageAdd',
Data => \%Param,
);
4.) Mask
File: AgentMessageAdd.tt
Directory: /Custom/Kernel/Output/HTML/Templates/Standard
This is a copy of file "AgentTicketPhone.tt".
Calling the function "Post new message", the mask opens and a new message could created as a ticket.
But when clicking the Button "Create", nothing else happens.
unfortunately, there's no entry in the OTRS-Logfile or the Apache-Logfile.
I think, the new module uses the Core-Module
File: Ticket.pm
Directory: /Kernel/System
so, I don't have to develope a new Core-Module for this module.
Do I have to register this new module anywhere else?
Is there anything missing?
Thanks in advance.
Sepp
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/mailman/listinfo/dev