[SOLVED] Sorting of Testproject's Pulldown Menu

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Locked
didi
TestLink user
Posts: 9
Joined: Thu Oct 04, 2012 7:55 pm
Location: Zurich - Switzerland

[SOLVED] Sorting of Testproject's Pulldown Menu

Post by didi »

I am using 1.9.5 and was wondering, if there is a way to change the sorting of the appearance in the testprojects pulldown menu ?
A sorting done on the "projects managing page" is not reflected in the pulldown menu.
It seems, that the sorting is done in the sequence the projects have been created. I found nothing in this forum regarding "sorting" here, but a plugin for chrome.
Unfortunately, in our compnay only IE is in use.
thx for a litte hint
Didi
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Sorting of Testproject's Pulldown Menu

Post by fman »

An advice: When looking for some feature, etc, you have several sources to investigate in addition to this forum
1. config.inc.php is a good source for information.
give a look and you are going to find an answer

2. our mantis site (always do searches REMOVING the status filter)
didi
TestLink user
Posts: 9
Joined: Thu Oct 04, 2012 7:55 pm
Location: Zurich - Switzerland

Re: Sorting of Testproject's Pulldown Menu

Post by didi »

Thx fman for the hint => 6104 in 1.9.9 :-)
didi
TestLink user
Posts: 9
Joined: Thu Oct 04, 2012 7:55 pm
Location: Zurich - Switzerland

Re: Sorting of Testproject's Pulldown Menu

Post by didi »

Unfortunately, the solution posted and recommended in issue 6104 did not bring the expected result.
/**
* Order to use when building a testproject combobox (value must be SQL compliant)
* For example:
* 'ORDER BY name'
* 'ORDER_BY nodes_hierarchy.id DESC' -> similar effect to order last created firts
**/
$tlCfg->gui->tprojects_combo_order_by = 'ORDER BY nodes_hierarchy.id DESC';

I have changed the line to

$tlCfg->gui->tprojects_combo_order_by = 'ORDER BY name';

restarted the server, but the order of displayed projects in the testproject dropdown menu remains as it was (a.k.a creation date) and not alphapetically.
In the issue 6104 description it reads "product version 1.9.9" - Does that means, that from 1.9.9 onward this feature is supported even though in my release (1.9.5)
the config.inc.php contains the example line as described.
(p.s. I tried with IE & FF and with clean caches on both)
Any other hint ?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Sorting of Testproject's Pulldown Menu

Post by fman »

'ORDER BY nodes_hierarchy.name'; <<< table ALIAS is needed supported for 1.9.0 and UP
didi
TestLink user
Posts: 9
Joined: Thu Oct 04, 2012 7:55 pm
Location: Zurich - Switzerland

Re: Sorting of Testproject's Pulldown Menu

Post by didi »

Thx a lot, that does the job as expected :-)
Locked