|Anonymous | Login | Signup for a new account||2019-12-06 18:17 UTC|
|Main | My View | View Issues | Change Log | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003784||TestLink||Bug Tracking Systems Integration||public||2010-09-16 11:13||2011-01-22 15:11|
|Product Version||1.8.5 (bug fixing)|
|Fixed in Version||1.9.1 (bug fixing)|
|Summary||0003784: custom bug status in MantisBT causing error messages in TestLink|
|Description||As mentioned in 0003195, we have a working MantisBT integration into TestLink.|
As long as we're using only the predefined bug status shipped with MantisBt, the integration into TestLink works fine.
However, after creating custom status in MantisBT and setting a bug into this status, it's not displayed correctly in TestLink anymore, I get errors like this one:
WARNING E_NOTICE Undefined index: 9 - in C:\wamp\www\Testlink\lib\bugtracking\int_mantis.php - Line 102 PeterEhlers
18.02.2010 17:17:30 WARNING Der String 'issue_status_' ist für die Sprache 'de_DE' nicht lokalisiert PeterEhlers
To fix this, I needed to:
1) create a file custom_strings.txt in folder C:\wamp\www\Testlink\locale\de_DE, which contains my custom status: $TLS_issue_status_new_internal_bug = "Neues internes Problem";
2) edit C:\wamp\www\Testlink\lib\bugtracking\int_mantis.php and add this custom status at the beginning of the file, into array $code_status
The first step is okay, as this file is not overwritten when updating TestLink to a new version.
The second step, however, is problematic, as this file is overwritten when updating to a new TestLink version. So the changes in this file have to be restored manually after every update.
|Steps To Reproduce||What needs to be done:|
1) Add a description how to get custom Mantis bug status into TestLink, as I did above.
2) Think about a way how to avoid the second problem, e.g. using a custom_int_mantis.php or (even better), read the custom status directly from Mantis configuration.
|Tags||No tags attached.|
|QA Team - Task Workflow Status|
|Attached Files||int_mantis.php [^] (6,458 bytes) 2011-01-10 13:35|
Btw, when translating the custom bug status in custom_string.txt, one cannot use custom bug status containing a space:
$TLS_issue_status_mystatus = "Test";
$TLS_issue_status_my_status = "Test";
is not working
So you cannot translate a custom bug status in TestLink, if it contains a space. This really needs to be fixed, as we have a lot of custom bug status in MantisBT, which contains spaces.
|the only difference i see is an additional "_" in non working variable|
That's the point! This status has a space (blank) in Mantis. In Testlink's custom_strings.php, I cannot use
$TLS_issue_status_my status = "Test";
as this gives a PHP parse error.
This is why it's not possible to translate Mantis custom bug status, containing a space, into TestLink!
I think I've got the point:
We are doing translation creating a variable
$TLS_issue_status_my_status = "Test";
seems we create name this way $TLS_issue_status_ . 'status', then if status is ' work in progress,
we try to create folowwing variable:
$TLS_issue_status_work in progress
tha ovbiously PHP (and no other language I know) accept
before trying to create variable name we need to replace spaces with '_'.
or people must avoid creating this kind of codes
think we can accept a contribution from KarlReichert.
Yes fman, you're right. It's not possible to use a variable name containing a space in PHP. Therefore, one must use underscores.
What TestLink has to do, is to replace the underscores by spaces, to find the corresponding custom bug status in MantisBT.
developers have no time to do interpretation of issues, just because users ( a suprise is that people from QA world in not willing to explain in detail issues) write for his/her own understanding.
As stated we can accept your contribution, but we are not going to fix this issue in mid-term (i.e. next 3 months).
I think I have explained the issue in very detail, from the beginning on. If this is not sufficient for developers to understand the issue, I'm sorry for that, and I'm always willing to add any further information needed.
I will see, if I can fix the issue myself, and if so, I will commit a patch to TestLink.
I added a line in function getBugStatusString($id) in file int_mantis.php - please see attachment.
Before getting the localized string of the Mantis bug status by calling function lang_get(), any blanks in the bug status will be replaced by an underscore by calling function str_replace().
This solves the issue for me in TestLink 1.9. I tested it and I didn't found any bugs. Please feel free to add this to the next TestLink version.
However, the second problem (there is no file custom_int_mantis.php) is still not solved. I will try to get this solved now ...
|2010-09-16 11:13||KarlReichert||New Issue|
|2010-09-23 09:34||KarlReichert||Note Added: 0011472|
|2010-09-23 09:56||Julian||Note Added: 0011474|
|2010-09-23 09:59||KarlReichert||Note Added: 0011475|
|2010-09-23 17:17||fman||Note Added: 0011486|
|2010-09-24 07:23||KarlReichert||Note Added: 0011489|
|2010-09-24 08:50||fman||Note Added: 0011490|
|2010-09-24 09:04||KarlReichert||Note Added: 0011491|
|2011-01-10 13:35||KarlReichert||File Added: int_mantis.php|
|2011-01-10 13:39||KarlReichert||Note Added: 0013228|
|2011-01-12 18:36||fman||Status||new => resolved|
|2011-01-12 18:36||fman||Fixed in Version||=> 1.9.1 (bug fixing)|
|2011-01-12 18:36||fman||Resolution||open => fixed|
|2011-01-12 18:36||fman||Assigned To||=> fman|
|2011-01-22 15:11||fman||Note Added: 0013362|
|2011-01-22 15:11||fman||Status||resolved => closed|
|Copyright © 2000 - 2019 MantisBT Team|