znuny / Znuny

Znuny/Znuny LTS is a fork of the ((OTRS)) Community Edition, one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.
https://www.znuny.org
GNU General Public License v3.0
381 stars 89 forks source link

Bug - interface broken for non-English languages #150

Closed krd-wp closed 3 years ago

krd-wp commented 3 years ago

Normally when answering a ticket there is a box to choose the next ticket state,, preselect with some value. This was confirmed to work up to 6.0.34.

In 6.0.37 we experience this still working for the English language interface, but broken for all other languages.

Example from 6.0.37: When I close a ticket while having the English interface, I get:

                    <label for="StateID">Next ticket state:</label>
                    <div class="Field">
                        <select class="Modernize" id="StateID" name="StateID" title="…">
  <option value="">-</option>
  <option value="2" selected="selected">closed successful</option>
  <option value="3">closed unsuccessful</option>
  <option value="10">closed-no response needed</option>
  <option value="4">open</option>
  <option value="7">pending auto close+</option>
  <option value="8">pending auto close-</option>
  <option value="6">pending reminder</option>
</select>

When I switch my personal settings to any other language, this becomes with the same ticket:

                    <label for="StateID">ステータス:</label>
                    <div class="Field">
                        <select class="Modernize" id="StateID" name="StateID" title="…">
  <option value="">-</option>
  <option value="2">クローズ (成功)</option>
  <option value="3">クローズ (不成功)</option>
  <option value="10">closed-no response needed</option>
  <option value="4">対応中</option>
  <option value="7">保留 (自動クローズ+)</option>
  <option value="8">保留 (自動クローズ-)</option>
  <option value="6">保留中 (期限付)</option>
</select>

and the option is no longer selected. Likely because the code would select the option with the value "closed successful" but there is no such value in non-English interfaces, so nothing gets selected. This breaks the workflow for all users who don't use any local language than English.

akosiaris commented 3 years ago

Doing a bit of a bisect work and selectively reverting commits, I think 75d618bb8f is the culprit here. It is unclear to me from the commit message why that block of code was moved 400 lines and alerted from using $DataLocal to using $Dataref.

Reverting does seem to fix the issue but in my limited tests caused very slow loading times of the page. That might have been related to my test environment, I am just bringing it to avoid surprises.

Tronsy commented 3 years ago

Hey @krd-wp thank you for reporting. I was able to recreate the issue. We are already working on a solution.

Only version 6.0.37 is affected.

@akosiaris thanks for checking and finding the commit.

dennykorsukewitz commented 3 years ago

Fixed: lts 6.0.38: https://github.com/znuny/Znuny/commit/f074fe3dc4afb758d128a29eb6f9a2b325e981fd dev 6.2.1: https://github.com/znuny/Znuny/commit/74c3286c93ee3bdaa1a47cc2036263c52df21287