You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2015-01-20 15:32:51

tomolimo
Member
From: Grenoble, France
Registered: 2009-05-12
Posts: 515

Problem with generateCompletename in class DropdownTranslation

Dear all,

Here is a bug with dropdown translation when having a hierarchy of items and if one changes the name of top level item.
Let's do the following example:
Test is made with TaskCategory:

  • Test 1
    Test 2
    Test 3
        Test 3-1
            Test 3-1-1
            Test 3-1-2
        Test 3-2

Then add a French (or else) translation to Test 3-1-1: "fr: Test 3-1-1"
Then add a French (or else) translation to Test 3: "fr: Test 3"

Then you'll see that translations have been added to sons without translation and that completename for is a concatenation of all son names smile !

  • Test 1
    Test 2
    Test 3 -> "fr: Test 3" -> OK
        Test 3-1 -> "fr: Test 3 > Test 3-1" -> OK
            Test 3-1-1 -> "fr: Test 3 > Test 3-1 > Test 3-2 > fr: Test 3-1-1" -> NOK
            Test 3-1-2 -> "fr: Test 3 > test 3-1 > test 3-2 > fr: Test 3-1-1 > test 3-1-2" -> NOK
        Test 3-2 -> "fr: Test 3 > test 3-1 > test 3-2" -> NOK

This is tested in version 0.85.1,

thank you,
regards,
Tomolimo

PS: funny thing: in this function (generateCompletename there is a parameter ($add = true), which is not used...

Last edited by tomolimo (2015-01-20 15:35:50)


GLPI 9.2.4 - PHP 7.2.13 x64 / ProcessMaker 3.3.0-community-RE-1.7 - PHP 7.1.24 x64 / Windows 2012 x64 / IIS 8.5 / MySQL 5.7.17 x64
Worldwide: >12316 PC, >9400 users (16 languages, >11 timezones), >360k tickets, >3600 entities, >4200 groups
Raynet is ARaymond (http://www.araymond.com) IT service management

Offline

#2 2015-01-21 09:12:42

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Problem with generateCompletename in class DropdownTranslation

This issue should fix it : https://forge.indepnet.net/issues/5136


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#3 2015-01-21 09:50:02

tomolimo
Member
From: Grenoble, France
Registered: 2009-05-12
Posts: 515

Re: Problem with generateCompletename in class DropdownTranslation

Before posting, I checked with version 0.85.1, and it is not fixed.

And anyway: checking the code for this function cannot give expected results, as completenane is concatenated at each loop, and never reset...


GLPI 9.2.4 - PHP 7.2.13 x64 / ProcessMaker 3.3.0-community-RE-1.7 - PHP 7.1.24 x64 / Windows 2012 x64 / IIS 8.5 / MySQL 5.7.17 x64
Worldwide: >12316 PC, >9400 users (16 languages, >11 timezones), >360k tickets, >3600 entities, >4200 groups
Raynet is ARaymond (http://www.araymond.com) IT service management

Offline

#4 2015-01-21 10:49:12

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Problem with generateCompletename in class DropdownTranslation


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

Board footer

Powered by FluxBB