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
261 stars 76 forks source link

Identifier dropdown in AdminDynamicFieldDB changes value #3645

Open stefanhaerter opened 3 months ago

stefanhaerter commented 3 months ago

When adding a new value in configuration of a dynamic field database, typing in a name and clicking elsewhere, the selected item of the identifier dropdown changes.

So far, I managed to find out that the redraw.InputField event intended to be triggered in

https://github.com/RotherOSS/otobo/blob/1ab24eb3184b95d2318fb00f2377e99bc7ca8bb1/var/httpd/htdocs/js/Core.Agent.Admin.DynamicFieldDB.js#L86

does not seem to be actually executed. When executing it explicitly after that line, the dropdown seems to keep its original value.

Observed in rel-10_1 and rel-11_0, other versions not tested yet.

stefanhaerter commented 6 days ago

My previous assumption that the redraw event is not triggered proved to be false. Further investigations pointed to the manual sorting above the linked line of code and the triggering of the change event might be the problem. I pushed the change to a feature branch, but I will think through this and investigate a bit more before converting it to a PR.