RotherOSS / otobo

OTOBO is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management. https://otobo.io/
GNU General Public License v3.0
263 stars 75 forks source link

some JavaScript libraries are loaded twice #1887

Open bschmalhofer opened 2 years ago

bschmalhofer commented 2 years ago

In the SysConfig there are entries like:

$Self->{'Loader::Agent::CommonJS'}->{'000-Framework'} =  [
  'thirdparty/jquery-3.6.0/jquery.min.js',
  'thirdparty/jquery-browser-detection/jquery-browser-detection.js',
  ...
  'Core.Agent.CustomerSearch.js',
  ...
];

and

$Self->{'Loader::Module::AgentTicketCompose'}->{'002-Ticket'} =  {
  'JavaScript' => [
    'Core.Agent.CustomerSearch.js',
    'Core.Agent.CustomerSearchAutoComplete.js',
    'Core.Agent.TicketAction.js',
    'Core.Agent.TicketCompose.js',
    'Core.Agent.TicketFormDraft.js'
  ]
};

Note that Core.Agent.CustomerSearch.js is mentioned in the setup for CotmmonJS and for specific frontends. This means that this library is included twice in the frontend AgentTicketCompose. There are no known errors that occurred because of this effect. But it is cleaner to include each JS library only once.

bschmalhofer commented 3 months ago

Assigned to milestone 11.1 as this is not urgent. Given to @chzauleck because she is more involved with the JavaScript libraries.