Skip to content

Fix in non-ANSI language, status board cannot be shown#18

Open
Zipher04 wants to merge 3 commits into
AuthenticEshkinKot:masterfrom
Zipher04:fix_nonANSI_status
Open

Fix in non-ANSI language, status board cannot be shown#18
Zipher04 wants to merge 3 commits into
AuthenticEshkinKot:masterfrom
Zipher04:fix_nonANSI_status

Conversation

@Zipher04

Copy link
Copy Markdown
Contributor

The statusNameL may contain non-ANSI characters, which cannot be used as array index.
The status code needed for m_statusByColumns is directly calculated by PHP.

Zipher04 added 2 commits May 11, 2018 17:58
Add a new class "status_code_order". Which return the status code in order of the status defined in the plugin configuration.
The statusNameL may contain non-ANSI characters, which cannot be used as array index.
The status code is get from PHP directly.
@AuthenticEshkinKot

Copy link
Copy Markdown
Owner

Hi, @Zipher04 !
Thanks for your PR. I would like to merge it, but I have one question - why did you add "status_code_order"? As far as I can see, you don't use it.

Fixed getStatusCodes_st() should get value from "status_code_order" from php page.
@Zipher04

Copy link
Copy Markdown
Contributor Author

Hello, @AuthenticEshkinKot
Sorry for the error. The "status_code_order" should be used by getStatusCodes_st(). Please see the fix above. Thank you!

Comment thread Taskodrome/pages/main.php

foreach( $status_name as $t_name ) {
for ( $i = 0 ; $i < sizeof($t_status_array) ; $i++ ){
if ( 0 == strcmp($t_name, $t_status_array[$i][1]) ){

@AuthenticEshkinKot AuthenticEshkinKot May 26, 2018

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're trying to compare status name from mantis ($t_status_array[$i][1], from config_get( 'status_enum_string' )), that is always english, and localized status name ($t_name, from $status_order), that may be on any other language. In such a case, this code compare will never return "true".

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zipher04
Would you like to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants