View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024416 | mantisbt | upgrade | public | 2018-05-09 14:50 | 2021-05-27 17:33 |
Reporter | aberaza86 | Assigned To | dregad | ||
Priority | immediate | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
OS | Windows | OS Version | 10 | ||
Product Version | 2.14.0 | ||||
Target Version | 2.16.0 | Fixed in Version | 2.16.0 | ||
Summary | 0024416: Improve handling of unserialize errors when upgrading | ||||
Description | I need help to migrate the Mantis 1.0.8 that my current company has to the latest version of 2.14.0. Someone could help me. to know well how should I do the migration, or how can I solve the error that it gives me? Alguien me podria ayudar. para saber bien como debo hacer la migracion, o como puedo solucionar el error que me da? | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
related to | 0021312 | confirmed | Error Schema step 193 - Upgrading 1.2.19 to 1.3.0 | |
has duplicate | 0024419 | closed | atrol | Error in migration from mantis 1.0.8 to 2.14 |
has duplicate | 0024488 | closed | atrol | need help to migrate the Mantis 1.0.8 that my current company has to the latest version of 2.14.0. |
related to | 0028638 | closed | atrol | update from 1.2.20 to 2.25.1 |
Please attach the output of the following SQL statement to the issue |
|
Results |
|
Delete the first two rows (the ones with project_id 148) |
|
I eliminated the first 2 rows and ran the installation again, but I still get the same error. |
|
in the same way, pressing the button to return to the administration, in the upper right part. it allows me to enter the incident screen and I can see them. But at the top it gives me an error, and when wanting to open a created incident, it gives me another worse error that does not let me see it. |
|
It's not exactly the same error. You shouldn't go on using the system as long as there is a problem when upgrading. What's now the output of |
|
ok, now I get this errors |
|
The first line ( |
|
I modified the value and subscribed the spaces and accents. (se necesitan más datos > se_necesitan_mas_datos). Now I get the following error: |
|
Please. I need help. |
|
@aberaza86 please have a look at the following, work-in-progress branch - it modifies the installer to abort more gracefully when upgrade steps 193, 194 and 195 fail because of invalid serialized data; It will identify the offending row, then you can take appropriate action to fix or delete it. This would be an iterative process, i.e. you have to re-run the upgrade until there are no more errors. https://github.com/dregad/mantisbt/tree/install-unserialize Let me know how it goes. |
|
I realize this: UPGRADING
Warning: Use of undefined constant PHP_MIN_VERSION - assumed 'PHP_MIN_VERSION' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\core.php on line 70 Warning: Use of undefined constant PHPMAILER_METHOD_MAIL - assumed 'PHPMAILER_METHOD_MAIL' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 630 Warning: Use of undefined constant POSITION_BOTTOM - assumed 'POSITION_BOTTOM' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1195 Warning: Use of undefined constant REPRODUCIBILITY_HAVENOTTRIED - assumed 'REPRODUCIBILITY_HAVENOTTRIED' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1456 Warning: Use of undefined constant PROJECTION_NONE - assumed 'PROJECTION_NONE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1462 Warning: Use of undefined constant ETA_NONE - assumed 'ETA_NONE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1468 Warning: Use of undefined constant BUG_REL_NONE - assumed 'BUG_REL_NONE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1474 Warning: Use of undefined constant UNABLE_TO_REPRODUCE - assumed 'UNABLE_TO_REPRODUCE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1715 Warning: Use of undefined constant LINKS_SAME_WINDOW - assumed 'LINKS_SAME_WINDOW' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1971 Warning: Use of undefined constant TOKEN_EXPIRY_AUTHENTICATED - assumed 'TOKEN_EXPIRY_AUTHENTICATED' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 2028 Warning: Use of undefined constant UNABLE_TO_REPRODUCE - assumed 'UNABLE_TO_REPRODUCE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 2234 Warning: Use of undefined constant AUTH_PAGE_USERNAME - assumed 'AUTH_PAGE_USERNAME' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 3510 Warning: Use of undefined constant ASCENDING - assumed 'ASCENDING' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 3730 Warning: Use of undefined constant DESCENDING - assumed 'DESCENDING' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 3731 Warning: Use of undefined constant DISPLAY_ERROR_HALT - assumed 'DISPLAY_ERROR_HALT' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 4257 Warning: Use of undefined constant DISPLAY_ERROR_HALT - assumed 'DISPLAY_ERROR_HALT' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 4258 Warning: Use of undefined constant DISPLAY_ERROR_INLINE - assumed 'DISPLAY_ERROR_INLINE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 4259 Warning: Use of undefined constant LOG_NONE - assumed 'LOG_NONE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 4301 Warning: Use of undefined constant POSITION_BOTTOM - assumed 'POSITION_BOTTOM' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1195 Warning: Use of undefined constant REPRODUCIBILITY_HAVENOTTRIED - assumed 'REPRODUCIBILITY_HAVENOTTRIED' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1456 Warning: Use of undefined constant PROJECTION_NONE - assumed 'PROJECTION_NONE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1462 Warning: Use of undefined constant ETA_NONE - assumed 'ETA_NONE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1468 Warning: Use of undefined constant BUG_REL_NONE - assumed 'BUG_REL_NONE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1474 Warning: Use of undefined constant UNABLE_TO_REPRODUCE - assumed 'UNABLE_TO_REPRODUCE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1715 Warning: Use of undefined constant LINKS_SAME_WINDOW - assumed 'LINKS_SAME_WINDOW' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 1971 Warning: Use of undefined constant TOKEN_EXPIRY_AUTHENTICATED - assumed 'TOKEN_EXPIRY_AUTHENTICATED' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 2028 Warning: Use of undefined constant UNABLE_TO_REPRODUCE - assumed 'UNABLE_TO_REPRODUCE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 2234 Warning: Use of undefined constant AUTH_PAGE_USERNAME - assumed 'AUTH_PAGE_USERNAME' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 3510 Warning: Use of undefined constant ASCENDING - assumed 'ASCENDING' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 3730 Warning: Use of undefined constant DESCENDING - assumed 'DESCENDING' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 3731 Warning: Use of undefined constant DISPLAY_ERROR_HALT - assumed 'DISPLAY_ERROR_HALT' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 4257 Warning: Use of undefined constant DISPLAY_ERROR_HALT - assumed 'DISPLAY_ERROR_HALT' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 4258 Warning: Use of undefined constant DISPLAY_ERROR_INLINE - assumed 'DISPLAY_ERROR_INLINE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 4259 Warning: Use of undefined constant LOG_NONE - assumed 'LOG_NONE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\mantisbt-2\config_defaults_inc.php on line 4301 |
|
Now I replaced the file "C: \ xampp \ htdocs \ mantisbt-2 \ config_defaults_inc.php" with the one of the previous installation of mantis and when updating the page it gives me the following errors: Warning: ob_start(): function 'compress_handler' not found or invalid function name in C:\xampp\htdocs\mantisbt-2\core.php on line 18 Notice: ob_start(): failed to create buffer in C:\xampp\htdocs\mantisbt-2\core.php on line 18 Warning: require_once(C:\xampp\htdocs\mantisbt-2\core\timer_api.php): failed to open stream: No such file or directory in C:\xampp\htdocs\mantisbt-2\core.php on line 90 Fatal error: require_once(): Failed opening required 'C:\xampp\htdocs\mantisbt-2\core\timer_api.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\mantisbt-2\core.php on line 90 |
|
@aberaza86: I yesterday made a migration from much newer than yours 1.2.5 to 1.3.15 with moving to new PHP (7.0). WIth direct migration I had some strange errors, please, find 30 minutes and do my long sequence:
Migration:
Enojoy.. Since the 1.0.8 you should spend around extra 15 minutes, if you made everything as I said and didn't skip a step. |
|
@aberaza86, I would ignore @Rost's suggestion in your case. You are already past the potential problems he tried to solve. What you reported in the the last 2 notes is completely unrelated to the original issue.
As per my earlier suggestion, please try the upgrade with the code from https://github.com/dregad/mantisbt/archive/install-unserialize.zip |
|
The zip-file does not contain the |
|
I tried to install the update with the code of https://github.com/dregad/mantisbt/archive/install-unserialize.zip. I copied the Vendor folder that I had and this is the message he gave. Schema step 195: UpdateFunction ( stored_filter_migrate ) Filter id 212 could not be converted because its data is not valid. Fix the problem by manually repairing or deleting the offending mantis_filters_table row as appropriate, then try again. a:33:{s:8:"_version";s:2:"v7";s:10:"_view_type";s:8:"advanced";s:8:"per_page";i:400;s:17:"highlight_changed";i:6;s:13:"sticky_issues";s:2:"on";s:4:"sort";s:12:"last_updated";s:3:"dir";s:3:"ASC";s:11:"start_month";i:1;s:9:"start_day";i:1;s:10:"start_year";i:2010;s:9:"end_month";i:1;s:7:"end_day";i:29;s:8:"end_year";i:2010;s:6:"search";s:0:"";s:16:"and_not_assigned";b:0;s:17:"do_filter_by_date";b:0;s:10:"view_state";i:0;s:17:"relationship_type";i:-1;s:16:"relationship_bug";i:0;s:13:"show_category";a:1:{i:0;s:1:"0";}s:13:"show_severity";a:1:{i:0;i:0;}s:11:"show_status";a:1:{i:0;i:0;}s:11:"reporter_id";a:1:{i:0;i:62;}s:10:"handler_id";a:1:{i:0;i:0;}s:15:"show_resolution";a:1:{i:0;i:0;}s:13:"show_priority";a:1:{i:0;i:0;}s:10:"show_build";a:1:{i:0;s:1:"0";}s:12:"show_version";a:1:{i:0;s:1:"0";}s:11:"hide_status";a:1:{i:0;i:-2;}s:16:"fixed_in_version";a:1:{i:0;s:1:"0";}s:12:"user_monitor";a:1:{i:0;i:0;}s:12:"show_profile";a:1:{i:0;i:0;}s:13:"custom_fields";a:8:{i:13;a:1:{i:0;s:1:"0";}i:1;a:1:{i:0;s:1:"0";}i:17;a:1:{i:0;s:1:"0";}i:2;a:1:{i:0;s:8:"Créditos";}i:6;a:1:{i:0;s:1:"0";}i:15;a:1:{i:0;s:1:"0";}i:14;a:1:{i:0;s:1:"0";}i:12;a:1:{i:0;s:1:"0";}}} |
|
From 0024416:0059769
Now there is @dregad I assume the database is not UTF-8 encoded. @aberaza86 please run admin/check/index.php and attach the results |
|
I ran admin / check / index.php, these are the results. |
|
After correcting all the lines that contained accent mark. I let myself perform the installation and update of the base. |
|
From what I see, you are using PHP 7.2.x on Windows. To get rid of the warning, you have to use PHP 7.1 or 7.0. |
|
It seems you did not correct the right way, as an status_enum_workflow causes the warning. |
|
Install the PHP 7.1 version and now I can see the incidents. |
|
I leave the file columns_api.php so you can see it columns_api.php (56,120 bytes)
<?php # MantisBT - A PHP based bugtracking system # MantisBT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # MantisBT is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with MantisBT. If not, see <http://www.gnu.org/licenses/>. /** * Columns API * * @package CoreAPI * @subpackage ColumnsAPI * @copyright Copyright 2000 - 2002 Kenzaburo Ito - kenito@300baud.org * @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net * @link http://www.mantisbt.org * * @uses access_api.php * @uses bug_api.php * @uses category_api.php * @uses config_api.php * @uses constant_inc.php * @uses custom_field_api.php * @uses date_api.php * @uses error_api.php * @uses event_api.php * @uses file_api.php * @uses helper_api.php * @uses icon_api.php * @uses lang_api.php * @uses prepare_api.php * @uses print_api.php * @uses project_api.php * @uses sponsorship_api.php * @uses string_api.php */ require_api( 'access_api.php' ); require_api( 'bug_api.php' ); require_api( 'category_api.php' ); require_api( 'columns_api.php' ); require_api( 'config_api.php' ); require_api( 'constant_inc.php' ); require_api( 'custom_field_api.php' ); require_api( 'date_api.php' ); require_api( 'error_api.php' ); require_api( 'event_api.php' ); require_api( 'file_api.php' ); require_api( 'helper_api.php' ); require_api( 'icon_api.php' ); require_api( 'lang_api.php' ); require_api( 'prepare_api.php' ); require_api( 'print_api.php' ); require_api( 'project_api.php' ); require_api( 'sponsorship_api.php' ); require_api( 'string_api.php' ); /** * Filters an array of columns based on configuration options. The filtering can remove * columns whose features are disabled. * * @param array $p_columns The columns proposed for display. * @return array The columns array after removing the disabled features. */ function columns_filter_disabled( array $p_columns ) { $t_columns = array(); $t_enable_profiles = ( config_get( 'enable_profiles' ) == ON ); foreach ( $p_columns as $t_column ) { switch( $t_column ) { case 'os': case 'os_build': case 'platform': if( ! $t_enable_profiles ) { continue 2; } break; case 'eta': if( config_get( 'enable_eta' ) == OFF ) { continue 2; } break; case 'projection': if( config_get( 'enable_projection' ) == OFF ) { continue 2; } break; case 'build': if( config_get( 'enable_product_build' ) == OFF ) { continue 2; } break; case 'sponsorship_total': if( config_get( 'enable_sponsorship' ) == OFF ) { continue 2; } break; default: # don't filter break; } $t_columns[] = $t_column; } # continued 2 return $t_columns; } /** * Get a list of standard columns. * @param boolean $p_enabled_columns_only Default true, if false returns all columns regardless of configuration settings. * @return array of column names */ function columns_get_standard( $p_enabled_columns_only = true ) { $t_reflection = new ReflectionClass( 'BugData' ); $t_columns = $t_reflection->getDefaultProperties(); $t_columns['selection'] = null; $t_columns['edit'] = null; $t_columns['notes'] = null; $t_columns['tags'] = null; # Overdue icon column (icons appears if an issue is beyond due_date) $t_columns['overdue'] = null; # The following fields are used internally and don't make sense as columns unset( $t_columns['_stats'] ); unset( $t_columns['profile_id'] ); unset( $t_columns['sticky'] ); unset( $t_columns['loading'] ); # legacy field unset( $t_columns['duplicate_id'] ); $t_column_names = array_keys( $t_columns ); if( $p_enabled_columns_only ) { $t_column_names = columns_filter_disabled( $t_column_names ); } return $t_column_names; } /** * Allow plugins to define a set of class-based columns, and register/load * them here to be used by columns_api. * @return array Mapping of column name to column object */ function columns_get_plugin_columns() { static $s_column_array = null; if( is_null( $s_column_array ) ) { $s_column_array = array(); $t_all_plugin_columns = event_signal( 'EVENT_FILTER_COLUMNS' ); foreach( $t_all_plugin_columns as $t_plugin => $t_plugin_columns ) { foreach( $t_plugin_columns as $t_callback => $t_plugin_column_array ) { if( is_array( $t_plugin_column_array ) ) { foreach( $t_plugin_column_array as $t_column_item ) { if( is_object( $t_column_item ) && $t_column_item instanceof MantisColumn ) { $t_column_object = $t_column_item; } elseif( class_exists( $t_column_item ) && is_subclass_of( $t_column_item, 'MantisColumn' ) ) { $t_column_object = new $t_column_item(); } else { continue; } $t_column_name = mb_strtolower( $t_plugin . '_' . $t_column_object->column ); $s_column_array[$t_column_name] = $t_column_object; } } } } } return $s_column_array; } /** * Get all columns for existing custom_fields * @return string Array of column names */ function columns_get_custom_fields() { static $t_col_names = null; if( isset( $t_col_names ) ) { return $t_col_names; } $t_all_cfids = custom_field_get_ids(); $t_col_names = array(); foreach( $t_all_cfids as $t_id ) { $t_col_names[] = column_get_custom_field_column_name( $t_id ); } return $t_col_names; } /** * Get all columns active for the current system. * This includes standard, custom fields, and plugin columns. * Columns for disabled modules are removed from this list, according to system * configuration. * * This function cannot check on current user/project, so it can be used by core * in potential unlogged-in scenarios. * @return array Array of column names */ function columns_get_all_active_columns() { $t_columns = array_merge( columns_get_standard(), array_keys( columns_get_plugin_columns() ), columns_get_custom_fields() ); return columns_filter_disabled( $t_columns ); } /** * Returns true if the specified $p_column is a plugin column. * @param string $p_column A column name. * @return boolean */ function column_is_plugin_column( $p_column ) { $t_plugin_columns = columns_get_plugin_columns(); return isset( $t_plugin_columns[$p_column] ); } /** * Get all accessible columns for the current project / current user. * @param integer $p_project_id A project identifier. * @return array array of columns * @access public */ function columns_get_all( $p_project_id = null ) { $t_columns = columns_get_standard(); # add plugin columns $t_columns = array_merge( $t_columns, array_keys( columns_get_plugin_columns() ) ); # Add project custom fields to the array. Only add the ones for which the current user has at least read access. if( $p_project_id === null ) { $t_project_id = helper_get_current_project(); } else { $t_project_id = $p_project_id; } # Get custom fields from this project and sub-projects $t_projects = user_get_all_accessible_projects( null, $t_project_id ); $t_related_custom_field_ids = custom_field_get_linked_ids( $t_projects ); foreach( $t_related_custom_field_ids as $t_id ) { $t_cfdef = custom_field_get_definition( $t_id ); $t_projects_to_check = array_intersect( $t_projects, custom_field_get_project_ids( $t_id ) ); if( access_has_any_project_level( (int)$t_cfdef['access_level_r'], $t_projects_to_check ) ) { $t_columns[] = column_get_custom_field_column_name( $t_id ); } } return $t_columns; } /** * Checks if the specified column is an extended column. Extended columns are native columns that are * associated with the issue but are saved in mantis_bug_text_table. * @param string $p_column The column name. * @return boolean true for extended; false otherwise. * @access public */ function column_is_extended( $p_column ) { switch( $p_column ) { case 'description': case 'steps_to_reproduce': case 'additional_information': return true; default: return false; } } /** * Checks if the specified column is a custom field column. * @param string $p_column The column name. * @return boolean True if its a custom field column */ function column_is_custom_field( $p_column ) { $t_cf_columns = columns_get_custom_fields(); return in_array( $p_column, $t_cf_columns ); } /** * Checks if the specified column can be sorted * @param string $p_column The column name. * @return boolean True if the column can be sorted */ function column_is_sortable( $p_column ) { # custom fields are always sortable if( column_is_custom_field( $p_column ) ) { return true; } # plugin fields contains a 'sortable' property if( column_is_plugin_column( $p_column ) ) { $t_plugin_columns = columns_get_plugin_columns(); $t_plugin_obj = $t_plugin_columns[$p_column]; return $t_plugin_obj->sortable; } #standard fields: define exceptions here switch( $p_column ) { case 'selection': case 'edit': case 'bugnotes_count': case 'attachment_count': case 'tags': case 'overdue': case 'additional_information': case 'description': case 'notes': case 'steps_to_reproduce': return false; } # after all exceptions, return true as default return true; } /** * Given a column name from the array of columns to be included in a view, this method checks if * the column is a custom column and if so returns its name. Note that for custom fields, then * provided names will have the "custom_" prefix, where the returned ones won't have the prefix. * * @param string $p_column Column name. * @return string The custom field column name or null if the specific column is not a custom field or invalid column. * @access public */ function column_get_custom_field_name( $p_column ) { if( strncmp( $p_column, 'custom_', 7 ) === 0 ) { return mb_substr( $p_column, 7 ); } return null; } /** * Returns the name of a column corresponding to a custom field, providing the id as parameter. * * @param integer $p_cf_id Custom field id * @return string The column name */ function column_get_custom_field_column_name( $p_cf_id ) { $t_def = custom_field_get_definition( $p_cf_id ); if( $t_def ) { return 'custom_' . $t_def['name']; } else { return null; } } /** * Converts a string of comma separate column names to an array. * * @param string $p_string Comma separate column name (not case sensitive). * @return array The array with all column names lower case. * @access public */ function columns_string_to_array( $p_string ) { $t_columns = explode( ',', $p_string ); $t_count = count( $t_columns ); for( $i = 0; $i < $t_count; $i++ ) { $t_columns[$i] = trim( $t_columns[$i] ); } return $t_columns; } /** * Gets the localized title for the specified column. The column can be native or custom. * The custom fields must contain the 'custom_' prefix. * * @param string $p_column The column name. * @return string The column localized name. * @access public */ function column_get_title( $p_column ) { $t_custom_field = column_get_custom_field_name( $p_column ); if( $t_custom_field !== null ) { $t_field_id = custom_field_get_id_from_name( $t_custom_field ); if( $t_field_id === false ) { $t_custom_field = '@' . $t_custom_field . '@'; } else { $t_def = custom_field_get_definition( $t_field_id ); $t_custom_field = lang_get_defaulted( $t_def['name'] ); } return $t_custom_field; } $t_plugin_columns = columns_get_plugin_columns(); if( isset( $t_plugin_columns[$p_column] ) ) { $t_column_object = $t_plugin_columns[$p_column]; return $t_column_object->title; } switch( $p_column ) { case 'attachment_count': return lang_get( 'attachments' ); case 'bugnotes_count': return '#'; case 'category_id': return lang_get( 'category' ); case 'edit': return ''; case 'handler_id': return lang_get( 'assigned_to' ); case 'last_updated': return lang_get( 'updated' ); case 'os_build': return lang_get( 'os_version' ); case 'project_id': return lang_get( 'email_project' ); case 'reporter_id': return lang_get( 'reporter' ); case 'selection': return ''; case 'sponsorship_total': return sponsorship_get_currency(); case 'version': return lang_get( 'product_version' ); case 'view_state': return lang_get( 'view_status' ); default: return lang_get_defaulted( $p_column ); } } /** * Checks an array of columns for duplicate or invalid fields. * * @param string $p_field_name The logic name of the array being validated. Used when triggering errors. * @param array $p_columns_to_validate The array of columns to validate. * @param array $p_columns_all The list of all valid columns. * @return boolean * @access public */ function columns_ensure_valid( $p_field_name, array $p_columns_to_validate, array $p_columns_all ) { $t_columns_all_lower = array_map( 'mb_strtolower', $p_columns_all ); # Check for invalid fields foreach( $p_columns_to_validate as $t_column ) { if( !in_array( mb_strtolower( $t_column ), $t_columns_all_lower ) ) { error_parameters( $p_field_name, $t_column ); trigger_error( ERROR_COLUMNS_INVALID, ERROR ); return false; } } # Check for duplicate fields $t_columns_no_duplicates = array(); foreach( $p_columns_to_validate as $t_column ) { $t_column_lower = mb_strtolower( $t_column ); if( in_array( $t_column, $t_columns_no_duplicates ) ) { error_parameters( $p_field_name, $t_column ); trigger_error( ERROR_COLUMNS_DUPLICATE, ERROR ); } else { $t_columns_no_duplicates[] = $t_column_lower; } } return true; } /** * Validates an array of column names and removes ones that are not valid. The validation * is not case sensitive. * * @param array $p_columns The array of column names to be validated. * @param array $p_columns_all The array of all valid column names. * @return array The array of valid column names found in $p_columns. * @access public */ function columns_remove_invalid( array $p_columns, array $p_columns_all ) { $t_columns_all_lower = array_values( array_map( 'mb_strtolower', $p_columns_all ) ); $t_columns = array(); foreach( $p_columns as $t_column ) { if( in_array( mb_strtolower( $t_column ), $t_columns_all_lower ) ) { $t_columns[] = $t_column; } } return $t_columns; } /** * Print table header for selection column * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_selection( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-selection">   </th>'; } /** * Print table header for edit column * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_edit( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-edit">   </th>'; } /** * Print table header for column ID * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-id">'; print_view_bug_sort_link( lang_get( 'id' ), 'id', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'id' ); echo '</th>'; } /** * Print table header for column project id * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_project_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-project-id">'; print_view_bug_sort_link( lang_get( 'email_project' ), 'project_id', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'project_id' ); echo '</th>'; } /** * Print table header for column reporter id * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_reporter_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-reporter">'; print_view_bug_sort_link( lang_get( 'reporter' ), 'reporter_id', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'reporter_id' ); echo '</th>'; } /** * Print table header for column handler id * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_handler_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-assigned-to">'; print_view_bug_sort_link( lang_get( 'assigned_to' ), 'handler_id', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'handler_id' ); echo '</th>'; } /** * Print table header for column priority * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_priority( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-priority">'; # Use short label only when displaying icons $t_label = lang_get( config_get( 'show_priority_text' ) ? 'priority' : 'priority_abbreviation' ); print_view_bug_sort_link( $t_label, 'priority', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'priority' ); echo '</th>'; } /** * Print table header for column reproducibility * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_reproducibility( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-reproducibility">'; print_view_bug_sort_link( lang_get( 'reproducibility' ), 'reproducibility', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'reproducibility' ); echo '</th>'; } /** * Print table header for column projection * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_projection( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-projection">'; print_view_bug_sort_link( lang_get( 'projection' ), 'projection', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'projection' ); echo '</th>'; } /** * Print table header for column ETA * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_eta( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-eta">'; print_view_bug_sort_link( lang_get( 'eta' ), 'eta', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'eta' ); echo '</th>'; } /** * Print table header for column resolution * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_resolution( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-resolution">'; print_view_bug_sort_link( lang_get( 'resolution' ), 'resolution', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'resolution' ); echo '</th>'; } /** * Print table header for column fixed in version * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_fixed_in_version( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-fixed-in-version">'; print_view_bug_sort_link( lang_get( 'fixed_in_version' ), 'fixed_in_version', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'fixed_in_version' ); echo '</th>'; } /** * Print table header for column tags * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_tags( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-tags">' . lang_get('tags') . '</th>'; } /** * Print table header for column target version * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_target_version( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-target-version">'; print_view_bug_sort_link( lang_get( 'target_version' ), 'target_version', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'target_version' ); echo '</th>'; } /** * Print table header for column view state * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_view_state( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-view-state">'; $t_view_state_text = lang_get( 'view_status' ); $t_view_state_icon = ' <i class="fa fa-lock" title="' . $t_view_state_text . '"></i>'; print_view_bug_sort_link( $t_view_state_icon, 'view_state', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'view_state' ); echo '</th>'; } /** * Print table header for column OS * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_os( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-os">'; print_view_bug_sort_link( lang_get( 'os' ), 'os', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'os' ); echo '</th>'; } /** * Print table header for column OS Build * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_os_build( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-os-build">'; print_view_bug_sort_link( lang_get( 'os_version' ), 'os_build', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'os_build' ); echo '</th>'; } /** * Print table header for column Build * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_build( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { if( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { echo '<th class="column-build">'; print_view_bug_sort_link( lang_get( 'build' ), 'build', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'build' ); echo '</th>'; } else { echo lang_get( 'build' ); } } /** * Print table header for column Platform * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_platform( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-platform">'; print_view_bug_sort_link( lang_get( 'platform' ), 'platform', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'platform' ); echo '</th>'; } /** * Print table header for column version * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_version( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-version">'; print_view_bug_sort_link( lang_get( 'product_version' ), 'version', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'version' ); echo '</th>'; } /** * Print table header for column date submitted * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_date_submitted( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-date-submitted">'; print_view_bug_sort_link( lang_get( 'date_submitted' ), 'date_submitted', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'date_submitted' ); echo '</th>'; } /** * Print table header for column attachment count * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_attachment_count( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { $t_attachment_count_text = lang_get( 'attachment_count' ); $t_attachment_count_icon = "<i class=\"fa fa-paperclip blue\" title=\"$t_attachment_count_text\" ></i>"; echo "\t" . '<th class="column-attachments">' . $t_attachment_count_icon . '</th>' . "\n"; } /** * Print table header for column category * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_category_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-category">'; print_view_bug_sort_link( lang_get( 'category' ), 'category_id', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'category_id' ); echo '</th>'; } /** * Prints Category column header * The actual column is 'category_id', this function is just here for backwards * compatibility * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_category( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { trigger_error( ERROR_GENERIC, WARNING ); print_column_title_category_id( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ); } /** * Print table header for column sponsorship total * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_sponsorship_total( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo "\t<th class=\"column-sponsorship\">"; print_view_bug_sort_link( sponsorship_get_currency(), 'sponsorship_total', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'sponsorship_total' ); echo "</th>\n"; } /** * Print table header for column severity * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_severity( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-severity">'; print_view_bug_sort_link( lang_get( 'severity' ), 'severity', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'severity' ); echo '</th>'; } /** * Print table header for column status * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_status( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-status">'; print_view_bug_sort_link( lang_get( 'status' ), 'status', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'status' ); echo '</th>'; } /** * Print table header for column last updated * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_last_updated( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-last-modified">'; print_view_bug_sort_link( lang_get( 'updated' ), 'last_updated', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'last_updated' ); echo '</th>'; } /** * Print table header for column summary * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_summary( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-summary">'; print_view_bug_sort_link( lang_get( 'summary' ), 'summary', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'summary' ); echo '</th>'; } /** * Print table header for column bugnotes count * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_bugnotes_count( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-bugnotes-count"> <i class="fa fa-comments blue"></i> </th>'; } /** * Print table header for column description * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_description( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-description">'; echo lang_get( 'description' ); echo '</th>'; } /** * Print table header for notes column. * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_notes( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-notes">'; echo lang_get( 'bug_notes_title' ); echo '</th>'; } /** * Print table header for column steps to reproduce * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_steps_to_reproduce( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-steps-to-reproduce">'; echo lang_get( 'steps_to_reproduce' ); echo '</th>'; } /** * Print table header for column additional information * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_additional_information( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-additional-information">'; echo lang_get( 'additional_information' ); echo '</th>'; } /** * Prints Due Date column header * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_due_date( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-due-date">'; print_view_bug_sort_link( lang_get( 'due_date' ), 'due_date', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'due_date' ); echo '</th>'; } /** * Print table header for column overdue * * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_overdue( $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-overdue">'; $t_overdue_text = lang_get( 'overdue' ); $t_overdue_icon = ' <i class="fa fa-times-circle-o" title="' . $t_overdue_text . '"></i>'; print_view_bug_sort_link( $t_overdue_icon, 'due_date', $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, 'due_date' ); echo '</th>'; } /** * Print table data for column selection * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_selection( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { global $g_checkboxes_exist; echo '<td class="column-selection">'; if( # check report_bug_threshold for the actions "copy" or "move" into any other project access_has_any_project_level( 'report_bug_threshold' ) || # !TODO: check if any other projects actually exist for the bug to be moved to access_has_project_level( config_get( 'move_bug_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) || # !TODO: factor in $g_auto_set_status_to_assigned == ON access_has_project_level( config_get( 'update_bug_assign_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) || access_has_project_level( config_get( 'update_bug_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) || access_has_project_level( config_get( 'delete_bug_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) || # !TODO: check to see if the bug actually has any different selectable workflow states access_has_project_level( config_get( 'update_bug_status_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) || access_has_project_level( config_get( 'set_bug_sticky_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) || access_has_project_level( config_get( 'change_view_status_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) || access_has_project_level( config_get( 'add_bugnote_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) || access_has_project_level( config_get( 'tag_attach_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) || access_has_project_level( config_get( 'roadmap_update_threshold', null, null, $p_bug->project_id ), $p_bug->project_id ) ) { $g_checkboxes_exist = true; echo '<div class="checkbox no-padding no-margin"><label>'; printf( '<input type="checkbox" name="bug_arr[]" value="%d" class="ace" />', $p_bug->id ); echo '<span class="lbl"></span>'; echo '</label></div>'; } else { echo ' '; } echo '</td>'; } /** * Print column title for a specific custom column. * * @param string $p_column Active column. * @param object $p_column_object Column object. * @param string $p_sort Sort. * @param string $p_dir Direction. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_title_plugin( $p_column, $p_column_object, $p_sort, $p_dir, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<th class="column-plugin">'; if( $p_column_object->sortable ) { print_view_bug_sort_link( string_display_line( $p_column_object->title ), $p_column, $p_sort, $p_dir, $p_columns_target ); print_sort_icon( $p_dir, $p_sort, $p_column ); } else { echo string_display_line( $p_column_object->title ); } echo '</th>'; } /** * Print custom column content for a specific bug. * @param object $p_column_object Column object. * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_plugin( $p_column_object, BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { if( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) { echo '<td class="column-plugin">'; $p_column_object->display( $p_bug, $p_columns_target ); echo '</td>'; } else { $p_column_object->display( $p_bug, $p_columns_target ); } } /** * Print column content for column edit * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_edit( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-edit">'; if( !bug_is_readonly( $p_bug->id ) && access_has_bug_level( config_get( 'update_bug_threshold' ), $p_bug->id ) ) { echo '<a href="' . string_get_bug_update_url( $p_bug->id ) . '">'; echo '<i class="fa fa-pencil bigger-130 padding-2 grey"'; echo ' title="' . lang_get( 'update_bug_button' ) . '"></i></a>'; } else { echo ' '; } echo '</td>'; } /** * Print column content for column priority * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_priority( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-priority">'; if( ON == config_get( 'show_priority_text' ) ) { print_formatted_priority_string( $p_bug ); } else { print_status_icon( $p_bug->priority ); } echo '</td>'; } /** * Print column content for column id * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_id( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-id">'; print_bug_link( $p_bug->id, false ); echo '</td>'; } /** * Print column content for column sponsorship total * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_sponsorship_total( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo "\t<td class=\"right column-sponsorship\">"; if( $p_bug->sponsorship_total > 0 ) { $t_sponsorship_amount = sponsorship_format_amount( $p_bug->sponsorship_total ); echo string_no_break( $t_sponsorship_amount ); } echo "</td>\n"; } /** * Print column content for column bugnotes count * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_bugnotes_count( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { global $g_filter; # grab the bugnote count $t_bugnote_stats = bug_get_bugnote_stats( $p_bug->id ); if( null !== $t_bugnote_stats ) { $t_bugnote_count = $t_bugnote_stats['count']; $v_bugnote_updated = $t_bugnote_stats['last_modified']; } else { $t_bugnote_count = 0; } echo '<td class="column-bugnotes-count">'; if( $t_bugnote_count > 0 ) { $t_show_in_bold = $v_bugnote_updated > strtotime( '-' . $g_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] . ' hours' ); if( $t_show_in_bold ) { echo '<span class="bold">'; } print_link( string_get_bug_view_url( $p_bug->id ) . '&nbn=' . $t_bugnote_count . '#bugnotes', $t_bugnote_count ); if( $t_show_in_bold ) { echo '</span>'; } } else { echo ' '; } echo '</td>'; } /** * Print column content for column attachment count * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_attachment_count( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { # Check for attachments $t_attachment_count = 0; if( file_can_view_bug_attachments( $p_bug->id, null ) ) { $t_attachment_count = file_bug_attachment_count( $p_bug->id ); } echo '<td class="column-attachments">'; if( $t_attachment_count > 0 ) { $t_href = string_get_bug_view_url( $p_bug->id ) . '#attachments'; $t_href_title = sprintf( lang_get( 'view_attachments_for_issue' ), $t_attachment_count, $p_bug->id ); echo '<a href="' . $t_href . '" title="' . $t_href_title . '">' . $t_attachment_count . '</a>'; } else { echo '   '; } echo "</td>\n"; } /** * Print column content for column category id * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_category_id( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { global $t_sort, $t_dir; # grab the project name $t_project_name = project_get_field( $p_bug->project_id, 'name' ); echo '<td class="column-category">'; echo '<div class="align-left">'; # type project name if viewing 'all projects' or if issue is in a subproject if( ON == config_get( 'show_bug_project_links' ) && helper_get_current_project() != $p_bug->project_id ) { echo '<span class="small project">['; print_view_bug_sort_link( string_display_line( $t_project_name ), 'project_id', $t_sort, $t_dir, $p_columns_target ); echo ']</span>  '; } echo string_display_line( category_full_name( $p_bug->category_id, false ) ); echo '</div>'; echo '</td>'; } /** * Print column content for column severity * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_severity( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-severity">'; print_formatted_severity_string( $p_bug ); echo '</td>'; } /** * Print column content for column eta * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_eta( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-eta">', get_enum_element( 'eta', $p_bug->eta, auth_get_current_user_id(), $p_bug->project_id ), '</td>'; } /** * Print column content for column projection * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_projection( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-projection">', get_enum_element( 'projection', $p_bug->projection, auth_get_current_user_id(), $p_bug->project_id ), '</td>'; } /** * Print column content for column reproducibility * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_reproducibility( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-reproducibility">', get_enum_element( 'reproducibility', $p_bug->reproducibility, auth_get_current_user_id(), $p_bug->project_id ), '</td>'; } /** * Print column content for column resolution * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_resolution( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-resolution">', get_enum_element( 'resolution', $p_bug->resolution, auth_get_current_user_id(), $p_bug->project_id ), '</td>'; } /** * Print column content for column status * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_status( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { $t_current_user = auth_get_current_user_id(); # choose color based on status $status_label = html_get_status_css_class( $p_bug->status, $t_current_user, $p_bug->project_id ); echo '<td class="column-status">'; echo '<div class="align-left">'; echo '<i class="fa fa-square fa-status-box ' . $status_label . '"></i> '; printf( '<span title="%s">%s</span>', get_enum_element( 'resolution', $p_bug->resolution, $t_current_user, $p_bug->project_id ), get_enum_element( 'status', $p_bug->status, $t_current_user, $p_bug->project_id ) ); # print handler user next to status if( $p_bug->handler_id > 0 && ON == config_get( 'show_assigned_names', null, $t_current_user, $p_bug->project_id ) && access_can_see_handler_for_bug( $p_bug ) ) { printf( ' (%s)', prepare_user_name( $p_bug->handler_id ) ); } echo '</div></td>'; } /** * Print column content for column handler id * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_handler_id( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-assigned-to">'; # In case of a specific project, if the current user has no access to the field, then it would have been excluded from the # list of columns to view. In case of ALL_PROJECTS, then we need to check the access per row. if( $p_bug->handler_id > 0 && ( helper_get_current_project() != ALL_PROJECTS || access_has_project_level( config_get( 'view_handler_threshold' ), $p_bug->project_id ) ) ) { echo prepare_user_name( $p_bug->handler_id ); } echo '</td>'; } /** * Print column content for column reporter id * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_reporter_id( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-reporter">'; echo prepare_user_name( $p_bug->reporter_id ); echo '</td>'; } /** * Print column content for column project id * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_project_id( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-project-id">'; echo string_display_line( project_get_name( $p_bug->project_id ) ); echo '</td>'; } /** * Print column content for column last updated * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_last_updated( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { global $g_filter; $t_last_updated = string_display_line( date( config_get( 'short_date_format' ), $p_bug->last_updated ) ); echo '<td class="column-last-modified">'; if( $p_bug->last_updated > strtotime( '-' . $g_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] . ' hours' ) ) { printf( '<span class="bold">%s</span>', $t_last_updated ); } else { echo $t_last_updated; } echo '</td>'; } /** * Print column content for column date submitted * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_date_submitted( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { $t_date_submitted = string_display_line( date( config_get( 'short_date_format' ), $p_bug->date_submitted ) ); echo '<td class="column-date-submitted">', $t_date_submitted, '</td>'; } /** * Print column content for column summary * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_summary( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { if( $p_columns_target == COLUMNS_TARGET_CSV_PAGE ) { $t_summary = string_attribute( $p_bug->summary ); } else { $t_summary = string_display_line_links( $p_bug->summary ); } echo '<td class="column-summary">' . $t_summary . '</td>'; } /** * Print column content for column description * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_description( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { $t_description = string_display_links( $p_bug->description ); echo '<td class="column-description">', $t_description, '</td>'; } /** * Print column content for notes column * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_notes( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { $t_notes = bugnote_get_all_visible_as_string( $p_bug->id, /* user_bugnote_order */ 'DESC', /* user_bugnote_limit */ 0 ); echo '<td class="column-notes">', string_display_links( $t_notes ), '</td>'; } /** * Print column content for column steps to reproduce * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_steps_to_reproduce( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { $t_steps_to_reproduce = string_display_links( $p_bug->steps_to_reproduce ); echo '<td class="column-steps-to-reproduce">', $t_steps_to_reproduce, '</td>'; } /** * Print column content for column additional information * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_additional_information( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { $t_additional_information = string_display_links( $p_bug->additional_information ); echo '<td class="column-additional-information">', $t_additional_information, '</td>'; } /** * Print column content for column target version * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_target_version( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-target-version">'; # In case of a specific project, if the current user has no access to the field, then it would have been excluded from the # list of columns to view. In case of ALL_PROJECTS, then we need to check the access per row. if( helper_get_current_project() != ALL_PROJECTS || access_has_project_level( config_get( 'roadmap_view_threshold' ), $p_bug->project_id ) ) { echo string_display_line( $p_bug->target_version ); } echo '</td>'; } /** * Print column content for view state column * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_view_state( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-view-state">'; if( VS_PRIVATE == $p_bug->view_state ) { $t_view_state_text = lang_get( 'private' ); echo ' <i class="fa fa-lock" title="' . $t_view_state_text . '"></i>'; } else { echo ' '; } echo '</td>'; } /** * Print column content for column tags * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_tags( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-tags">'; if( access_has_bug_level( config_get( 'tag_view_threshold' ), $p_bug->id ) ) { echo string_display_line( tag_bug_get_all( $p_bug->id ) ); } echo '</td>'; } /** * Print column content for column due date * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_due_date( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { $t_overdue = ''; if( !access_has_bug_level( config_get( 'due_date_view_threshold' ), $p_bug->id ) || date_is_null( $p_bug->due_date ) ) { $t_value = ' '; } else { if( bug_is_overdue( $p_bug->id ) ) { $t_overdue = ' overdue'; } $t_value = string_display_line( date( config_get( 'short_date_format' ), $p_bug->due_date ) ); } printf( '<td class="column-due-date%s">%s</td>', $t_overdue, $t_value ); } /** * Print column content for column overdue * * @param BugData $p_bug BugData object. * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php. * @return void * @access public */ function print_column_overdue( BugData $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) { echo '<td class="column-overdue">'; if( access_has_bug_level( config_get( 'due_date_view_threshold' ), $p_bug->id ) && !date_is_null( $p_bug->due_date ) && bug_is_overdue( $p_bug->id ) ) { $t_overdue_text = lang_get( 'overdue' ); $t_overdue_text_hover = sprintf( lang_get( 'overdue_since' ), date( config_get( 'short_date_format' ), $p_bug->due_date ) ); echo '<i class="fa fa-times-circle-o" title="' . string_display_line( $t_overdue_text_hover ) . '"></i>'; } else { echo ' '; } echo '</td>'; } |
|
Please attach the output of the following SQL statement to the issue |
|
I attach the data mantis_custom_field_table.csv (10,587 bytes)
"id";"name";"type";"possible_values";"default_value";"valid_regexp";"access_level_r";"access_level_rw";"length_min";"length_max";"require_report";"require_update";"display_report";"display_update";"require_resolved";"display_resolved";"display_closed";"require_closed";"filter_by" "0";"Caso de uso";"0";;;;"25";"55";"0";"5";"0";"0";"1";"1";"0";"0";"0";"0";"1" "2";"Modulo";"3";"|Ahorros|Banred|Banco central|Cajas|Cambios|Cheques|Clientes|Cobranza Externa|Cobranzas (morosidad)|Contabilidad|Créditos|Extranet ANV|Extranet BHU|Fideicomisos|Finanzas|General|Inmuebles|Otorgamiento|Parámetros|Plazo fijo|PCF|Retenciones";;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "6";"Punto del menú";"0";;;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"1";"0";"0";"1" "15";"Sub Categoria de Sub Proyectos";"3";"|Administración|Implementación|Capacitación|Testing|Otros";;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "14";"Tareas de";"3";"|Coordinación y Supervisión|Metodologia y QA|Apoyo a Infraestructura|Soporte a Producción Procesos Especiales|Soporte a Producción Consultoria|Soporte a Producción|Varios";;;"10";"10";"0";"0";"1";"0";"1";"1";"0";"0";"0";"0";"1" "12";"Tipo de incidente:";"3";"|Funcionalidad no disponible|Implementacion incorrecta|Mejora";;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "13";"Etapa";"3";"N/C|Análisis|Desarrollo|Testing|Producción";"Análisis";;"10";"25";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "17";"ID de incidente del cliente";"0";;;;"0";"0";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "18";"Nivel de Atención";"3";"|-|2do Nivel|1er Nivel";;;"10";"10";"0";"0";"0";"0";"0";"1";"1";"1";"1";"0";"1" "19";"Inicio Corrida (hh:mm)";"0";;;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "20";"Fin Corrida (hh:mm)";"0";;;;"10";"10";"0";"0";"0";"0";"0";"1";"1";"1";"0";"0";"1" "21";"Pregunta Wiki (Si es 1er Nivel de Atención)";"0";;;;"10";"10";"0";"0";"0";"0";"0";"1";"0";"1";"0";"0";"1" "22";"Nº Expediente o Solicitante";"0";;;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "23";"Persona de Contacto:";"0";;;;"10";"25";"0";"0";"1";"1";"1";"1";"0";"0";"0";"0";"1" "24";"Tipo Reunión";"3";"-|Urgente|Planificada|";;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"1";"0";"0";"1" "25";"Pedido Query";"3";"-|Nuevo|Reiterado";;;"10";"10";"0";"0";"0";"0";"1";"1";"1";"0";"0";"0";"1" "26";"¿Se puede realizar por el sistema?";"3";"-|SI|NO|";;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "27";"Bases a Restaurar";"0";;;;"10";"25";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "28";"Motivo de la Solicitud";"0";;;;"10";"10";"0";"0";"1";"0";"1";"1";"0";"0";"0";"0";"1" "29";"Caducidad del Ambiente";"8";;;;"10";"10";"0";"0";"1";"0";"1";"1";"0";"0";"0";"0";"1" "30";"Tipo de atención de guardia";"3";"Sin incidencias|SIGB|Base de datos|Infraestructura|Problema de operación";;;"10";"10";"0";"0";"1";"1";"1";"1";"0";"0";"0";"0";"1" "31";"Etapa_ant";"3";"Ingresado|En presupuestacion|Presupuestado|Resuelto";;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "32";"Equipo de desarrollo";"3";"|1 - CRG|2 - CDM|3 - IAC|4 - ANV|5 - NO CORRESPONDE|6 - INFRAESTRUCTURA|7 - QA|8 - CONSULTORIA";;;"10";"25";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1";"1" "63";"Fecha fin estimada";"8";;;;"10";"55";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "35";"Esfuerzo estimado (en horas)";"1";;;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "62";"Fecha inicio estimada";"8";;;;"10";"70";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "37";"Expediente BHU";"0";;;;"0";"0";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "38";"Expediente ANV";"0";;;;"10";"25";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "39";"Tarea Gantt";"1";;;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "40";"Stock";"3";"|STOCK1";;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "42";"Clasificaciòn";"3";"|Warning|Error|Otro";;;"25";"25";"0";"0";"0";"1";"0";"1";"0";"0";"0";"0";"1" "43";"Guardia In Situ";"3";"-|SI|NO";;;"10";"10";"0";"0";"0";"1";"0";"1";"1";"1";"0";"0";"1" "46";"Gestionado por";"3";"|ANV|BHU";;;"90";"90";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "45";"Cant LLamdas a Guardia";"1";;;;"10";"10";"0";"0";"0";"0";"0";"1";"0";"0";"0";"1";"1" "47";"Sucursal";"3";"|Casa Central|18 de Mayo|Artigas|Canelones|Carmelo|Colonia|De la costa|Dolores|Durazno|Florida|Fray Bentos|Maldonado|Melo|Mercedes|Minas|Nueva Helvecia|P.de los Toros|Pando|Paysandu|Primer Centenario|Rivera|Rocha|Salto|San Jose|Tacuarembo|Treinta y Tres|Trinidad";;;"10";"25";"0";"35";"1";"1";"1";"1";"0";"0";"0";"0";"1" "48";"Seccion";"3";"|-|Depto.Adm.Personal y Liq.Haberes|Depto.Atencion al Cliente|Depto.Base de Datos|Depto.Comercializacion|Depto.Contralor de Programas|Depto.Control de Gestion|Depto.de Comunicacion|Depto.Desarrollo Aplicaciones|Depto.Desarrollo de Programas|Depto.Desarrollo Humano y Capac.|Depto.Diseño de Productos Inm.|Depto.Diseño Productos Finan.|Depto.Estudio de Costos|Depto.Estudio de Mercado|Depto.Evaluacion Social|Depto.Gestion de Inmuebles|Depto.Gestion Fideicomisos|Depto.Gestion Servicios e Infraes.|Depto.Negocios Financieros|Depto.Presupuesto|Depto.Serv.Generales|Depto.Tesoria|Depto.Planificacion,Est. y Org.|Div.Abogacia|Div.Auditoria Interna|Div.Contaduria|Div.Desarrollo y Gestion Urbana|Div.Ejecuciones y Rescisiones|Div.Gestion y Desarrollo Humano|Div.Gestion y Recupero|Div.Mercado Financiero|Div.Mercado Inmobiliario|Div.Notarial|Div.Planificacion y Diseño Programas|Div.Secretaria General|Div.Seguimiento y Apoyo Tecnico|Div.Sistemas de Informacion|Area Admin. de Creditos|Area Finan. y Mercado Inmobiliario|Area Gestion de Rec|Area Juridica|Area Programas Habitacionales|Asesoria Letrada|Directorio|Gerencia General";;;"10";"25";"0";"50";"1";"1";"1";"1";"0";"0";"0";"0";"1" "49";"Numero de Interno:";"1";;;;"10";"25";"0";"0";"1";"1";"1";"1";"0";"0";"0";"0";"1" "52";"Tipo tarea";"3";"|Mantenimiento Correctivo|Mantenimiento Evolutivo|Corrección de Datos|Actualización de Datos|Soporte Operativo|Generación de Informes|Administración y Control de Gestión";;;"10";"25";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1";"1" "54";"Situación";"0";;;;"70";"70";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "55";"ID CP:";"0";;;;"10";"25";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "56";"ID Sesion:";"0";;;;"10";"10";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "57";"Tipo de Solicitud";"3";"|Antivirus|Recuperación de Respaldos|Publicación|Permisos de Acceso|Correo Electrónico|Permisos USB|Problemas Impresión SIGB|Otros|Resuelve Mesa de Ayuda";;;"10";"40";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "58";"Tipo de Reclamo";"3";"|Ayuda ofimática|Cambio de teclado,mouse, cables|Instalación de aplicaciones|Mantenimiento Impresoras (cambio tonner y unidad de imagen)|Otros|Problema de monitor|Problema impresora Brother|Problema impresora Epson - cajas|Problema impresora HP|Problema impresora OKI|Problema otras impresoras|Problema pc hardware - Clon|Problema pc hardware - Dell|Problema pc hardware - IBM|Problema pc hardware - Lenovo|Problema Redes|Problemas de Impresión SIGB|Software - falla otros|Software - falla por Office|Software - falla por SO|Resuelve Mesa de Ayuda";;;"10";"40";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "59";"xx";"0";;;;"0";"0";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" "64";"Recursos";"3";"|agrimald|alvaro_lopez|carusso|cchadare|dvargas|fabricio_echevarria|fedeleon|gmauris|jolveira|maria_gonzalez|mauricio_jorajuria|mdemaria|monica_long|paula_rodriguez|renss|rmeneses";;;"10";"70";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "65";"prueba";"3";"SI|NO";"SI";;"10";"55";"0";"0";"0";"1";"0";"1";"1";"1";"0";"0";"1" "66";"Incidente impide operativa y no existe contingencia:";"3";"NO|SI";"NO";;"10";"55";"0";"0";"1";"1";"1";"1";"0";"0";"0";"0";"1" "67";"Fecha fin estimada FIJA";"8";;;;"10";"70";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "68";"Fecha inicio estimada FIJA";"8";;;;"10";"70";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "70";"Sector";"0";;;;"10";"25";"0";"0";"1";"1";"1";"1";"0";"0";"0";"0";"1" "71";"Categorías Exoneraciones";"3";"|Cuenta Corriente IVA|Declaraciones Juradas (Ventas y Alquiler)|Mejoras BD|Reportes|Vivienda Interés Social|Estudio de Costos|Seguimiento de Proyectos|Publicaciones en Web ANV|Generales-Nuevos|Generales-Errores|Sin Clasificar";;;"10";"25";"0";"0";"0";"0";"1";"1";"0";"1";"1";"0";"1" "72";"Servicio Origen de Caída";"3";"|Procesos Batch|SIGB|Correo Electrónico|Buxis|Magma|Servicios de Testing|Red(incluye directorios comunes)|UFlow|Comunicación Data Center|Data Center Operativo|Servicios de SQL|VPN|Registro de Trámites|Data Warehouse|Sistema de Exoneraciones|Monitor de Servicios|Mantis|Axentria|Conexión Catastro e IMM|Portal ANV|Sistema de Gestión de Cooperativas|SGO|SIG|";;;"10";"40";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "82";"Días Esfuerzo Estimado";"1";;;;"10";"70";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "73";"Caida en atencion";"0";"|S|N";;;"90";"90";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "81";"Solicitud Aceptada";"3";"SI|NO";"SI";;"10";"10";"0";"0";"0";"0";"0";"1";"1";"1";"0";"0";"1" "74";"Impacto";"3";"|ALTO|MEDIO|BAJO";;;"10";"55";"0";"0";"1";"1";"1";"1";"1";"1";"1";"1";"1" "75";"Número Inventario:";"0";;;;"10";"40";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "76";"Número Serie:";"0";;;;"10";"40";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "77";"Entrega:";"3";"|avidal|aferreir|gmigues|gperez|jrodrigu|mmansilla|srodrigueza|aqueirolo|SOLICITUD RECHAZADA";;;"10";"40";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "78";"Fecha Entrega:";"8";;;;"10";"40";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "79";"Recibe:";"0";;;;"10";"40";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "80";"OK a Pedido Hardware";"3";"SI|NO";"SI";;"10";"70";"0";"0";"0";"0";"0";"1";"1";"1";"1";"1";"1" "83";"Con Actividad Reciente";"3";"SI|NO";"SI";;"10";"10";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "84";"Gestión Mesa de Ayuda";"3";"Sin gestionar|1er contacto|2do contacto|3er contacto";"Sin gestionar";;"10";"10";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "85";"Fecha Control Actividad";"8";;;;"10";"10";"0";"0";"0";"0";"0";"1";"0";"0";"0";"0";"1" "86";"Publicación Asociada a PROYECTO";"3";"|P70 - Requerimientos de Exoneración de Impuestos|P90 - Programa Ahorro Joven|P94 - Acceso WEB para usuarios externos|PR65 - Sistema de Gestión de Cooperativas|T85 - Gestión de Morosidad|T76 - Inmuebles";;;"10";"55";"0";"0";"0";"0";"1";"1";"0";"1";"0";"0";"1" "87";"Mantenimiento";"3";"NO|SI";"NO";;"10";"55";"0";"0";"0";"0";"1";"1";"0";"0";"0";"0";"1" |
|
After changing to PHP 7.1 and maybe other changes, are you still not able to run the checks admin/check/index.php ? |
|
After changing to PHP 7.1. I can enter the mantis and see the incidents perfectly. what if I still sat down is the error of the column_api.php |
|
0024416:0059961 does not answer my question from 0024416:0059957
If you are not able to run admin/check/index.php, you can execute the following statements
Furthermore execute |
|
Checking your MantisBT installation... |
|
So I was right when writing at 0024416:0059838
I am not complete sure, but I assume this is causing the former upgrade issues and maybe also the You can try to change the encoding in your current upgrades database, but the clean solution would be to start with your old database, convert it to utf-8 and run the upgrade script (that might even run without producing errors). In case you don't know how to convert, this might help https://stackoverflow.com/questions/8906813/how-to-change-the-default-charset-of-a-mysql-table |
|
I converted my previous base to UTF-8 and then ran the installation again. |
|
@aberaza86 please use your brain and try to fix problems on your own before coming here crying for help. This is the exact same error you already reported (and solved) in 0024416:0059762. |
|
I know it's the same mistake (and how it's solved), I'm not stupid. I'll post it again to show that by changing the encoding of the base, that error persists. Because the idea is not to have to replace all the letters with tilde. |
|
Note that the improvement just committed does not actually fix the issue, it just gives the Admin more detailed information to allow them to take proper corrective action. |
|
Hello, I also migrated two very old MantisBT: v1.0.1 and v1.1.7. I started with v2.12.0 and I'm at v2.15.0. I encountered the same problem: "Schema step 193: UpdateFunction (check_config_serialization)". At first I deleted all records of type 3 (21312~0057283) and I could pass this step. But the solution did not satisfy me because I lost too many lines of configuration. I noticed in the note 21312~0057283 the presence of the accented character "màs". As in Spanish, the French language has accented characters. I therefore deduced that the problem could come from these characters. UPDATE UPDATE UPDATE UPDATE In this way I do not lose any line. I tried to change the character set of tables in utf8_general_ci, before migrating and when I had the error message, with ALTER TABLE I do not have an error at step 194. When I continue the installation I have an error in step 195 "Schema step 195: UpdateFunction (stored_filter_migrate)" UPDATE UPDATE UPDATE And I have no problem, the migration ends properly. I'm sorry but three months ago (for my setup and my data) I had solved my problem. Unfortunately my migration project really takes a lot of time and I did not have an account to communicate my solution. My configuration :
|
|
I just tested the migration by modifying the error_api.php, install_helper_functions_api.php and utility_api.php files. The full line of the screenshot for step 193 : The full line of the screenshot for step 195 : |
|
MantisBT: master 086f3104 2018-06-20 02:39 Details Diff |
Upgrade: improve handling of unserialize errors Merging PR https://github.com/mantisbt/mantisbt/pull/1359 In MantisBT 1.3, the method used to store config, token and filter data changed from serialize to JSON. Upgrade steps 193, 194 and 195 were added to convert legacy data to the new format. This frequently caused the upgrade process to fail when unserialize() could not interpret the data, but the MantisBT installer just aborted without providing any useful information to the admin. This improves the error reporting, clearly identifying the offending record so that the admin can take appropriate action to fix the problem. Fixes 0024416, 0021376 (and maybe others too) |
Affected Issues 0021376, 0024416 |
|
mod - core/error_api.php | Diff File | ||
mod - core/install_helper_functions_api.php | Diff File | ||
mod - core/utility_api.php | Diff File |