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: 517

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.5.5 - PHP 7.4 / ProcessMaker 3.3.0-community - PHP 7.1 / Windows 2016 / IIS  / MySQL 5.7
Worldwide: >17k Computers, >17k Users (16 languages, >11 timezones), >610k tickets, >6700 entities, >7600 Groups, >20700 process cases
Raynet is ARaymond (https://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: 517

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.5.5 - PHP 7.4 / ProcessMaker 3.3.0-community - PHP 7.1 / Windows 2016 / IIS  / MySQL 5.7
Worldwide: >17k Computers, >17k Users (16 languages, >11 timezones), >610k tickets, >6700 entities, >7600 Groups, >20700 process cases
Raynet is ARaymond (https://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