? javascript/jscalendar Index: bug_change_status_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_change_status_page.php,v retrieving revision 1.27 diff -u -r1.27 bug_change_status_page.php --- bug_change_status_page.php 4 Jan 2007 10:07:44 -0000 1.27 +++ bug_change_status_page.php 22 Mar 2007 22:03:03 -0000 @@ -22,13 +22,13 @@ project_id != helper_get_current_project() ) { # in case the current project is not the same project of the bug we are viewing... # ... override the current project. This to avoid problems with categories and handlers lists etc. $g_project_override = $t_bug->project_id; } - + $f_new_status = gpc_get_int( 'new_status' ); $f_reopen_flag = gpc_get_int( 'reopen_flag', OFF ); @@ -68,7 +68,7 @@ $t_status_label = str_replace( " ", "_", get_enum_to_string( config_get( 'status_enum_string' ), $f_new_status ) ); $t_resolved = config_get( 'bug_resolved_status_threshold' ); - $t_bug = bug_get( $f_bug_id ); + $t_bug = bug_prepare_edit( bug_get( $f_bug_id ) ); html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) ); html_page_top2(); @@ -113,7 +113,7 @@ +reporter_id == auth_get_current_user_id() ) { ?> +> + + + + + + type="checkbox" name="due"due) echo " checked" ?>> + remind_date ) ?> + + + + +> + + + + + + type="checkbox" name="remind"remind) echo " checked" ?>> + remind_date ) ?> + + + reproducibility = gpc_get_int( 'reproducibility', config_get( 'default_bug_reproducibility' ) ); $t_bug_data->severity = gpc_get_int( 'severity', config_get( 'default_bug_severity' ) ); $t_bug_data->priority = gpc_get_int( 'priority', config_get( 'default_bug_priority' ) ); + $t_bug_data->due = gpc_get_bool( 'due' ); + $t_bug_data->date_due = convert_date( gpc_get_string( 'due_date' ).' '.gpc_get_string( 'due_time' ), config_get( 'normal_date_format' ) ); + $t_bug_data->remind = gpc_get_bool( 'remind' ); + $t_bug_data->date_remind = convert_date( gpc_get_string( 'due_date' ).' '.gpc_get_string( 'due_time' ), config_get( 'normal_date_format' ) ); $t_bug_data->summary = gpc_get_string( 'summary' ); $t_bug_data->description = gpc_get_string( 'description' ); $t_bug_data->steps_to_reproduce = gpc_get_string( 'steps_to_reproduce', config_get ( 'default_bug_additional_info' ) ); Index: bug_report_advanced_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_report_advanced_page.php,v retrieving revision 1.60 diff -u -r1.60 bug_report_advanced_page.php --- bug_report_advanced_page.php 10 Mar 2007 04:30:18 -0000 1.60 +++ bug_report_advanced_page.php 20 Mar 2007 22:03:30 -0000 @@ -94,6 +94,8 @@ $f_reproducibility = gpc_get_int( 'reproducibility', config_get( 'default_bug_reproducibility' ) ); $f_severity = gpc_get_int( 'severity', config_get( 'default_bug_severity' ) ); $f_priority = gpc_get_int( 'priority', config_get( 'default_bug_priority' ) ); + $f_due_date = convert_date ( '2099-01-01', config_get( 'short_date_format' ), 'Y-m-d' ); + $f_due_time = '09:00'; $f_summary = gpc_get_string( 'summary', '' ); $f_description = gpc_get_string( 'description', '' ); $f_steps_to_reproduce = gpc_get_string( 'steps_to_reproduce', config_get( 'default_bug_steps_to_reproduce' ) ); @@ -147,12 +149,12 @@ echo "[" . project_get_field( $t_bug->project_id, 'name' ) . "] "; } ?> @@ -199,6 +201,42 @@ + + +> + + + + + type="text" name="due_date" size="10" maxlength="10" value="" /> + + + +> + + + + + type="text" name="remind_date" size="10" maxlength="10" value="" /> + + + + +   Index: bug_report_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_report_page.php,v retrieving revision 1.61 diff -u -r1.61 bug_report_page.php --- bug_report_page.php 10 Mar 2007 04:30:18 -0000 1.61 +++ bug_report_page.php 22 Mar 2007 21:00:17 -0000 @@ -79,6 +79,8 @@ $f_reproducibility = gpc_get_int( 'reproducibility', config_get( 'default_bug_reproducibility' ) ); $f_severity = gpc_get_int( 'severity', config_get( 'default_bug_severity' ) ); $f_priority = gpc_get_int( 'priority', config_get( 'default_bug_priority' ) ); + $f_due_date = convert_date ( '2099-01-01', 'Y-m-d', config_get( 'short_date_format' ) ); + $f_due_time = '09:00'; $f_summary = gpc_get_string( 'summary', '' ); $f_description = gpc_get_string( 'description', '' ); $f_additional_info = gpc_get_string( 'additional_info', config_get ( 'default_bug_additional_info' ) ); @@ -132,12 +134,12 @@ echo "[" . project_get_field( $t_bug->project_id, 'name' ) . "] "; } ?> @@ -185,6 +187,27 @@ + + +> + + + + + type="checkbox" name="due"due) echo " checked" ?>> + + + + + +   Index: bug_update.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_update.php,v retrieving revision 1.91 diff -u -r1.91 bug_update.php --- bug_update.php 12 Dec 2006 18:26:28 -0000 1.91 +++ bug_update.php 22 Mar 2007 22:24:09 -0000 @@ -50,6 +50,21 @@ $t_bug_data->handler_id = gpc_get_int( 'handler_id', $t_bug_data->handler_id ); $t_bug_data->duplicate_id = gpc_get_int( 'duplicate_id', $t_bug_data->duplicate_id ); $t_bug_data->priority = gpc_get_int( 'priority', $t_bug_data->priority ); + + if (gpc_get_bool( '_check_due' )) { + $t_bug_data->due = gpc_get_bool( 'due' ); + } + list($date, $time) = split(' ', $t_bug_data->date_due); + $date = convert_date( $date, 'Y-m-d', config_get( 'short_date_format' ) ); + $t_bug_data->date_due = convert_date( gpc_get_string( 'due_date', $date ), config_get( 'short_date_format' ), 'Y-m-d' ).' '.gpc_get_string( 'due_time', $time ) . ':00'; + + if (gpc_get_bool( '_check_remind' )) { + $t_bug_data->remind = gpc_get_bool( 'remind' ); + } + list($date, $time) = split(' ', $t_bug_data->date_remind); + $date = convert_date( $date, 'Y-m-d', config_get( 'short_date_format' ) ); + $t_bug_data->date_remind = convert_date( gpc_get_string( 'remind_date', $date ), config_get( 'short_date_format' ), 'Y-m-d' ).' '.gpc_get_string( 'remind_time', $time ) . ':00'; + $t_bug_data->severity = gpc_get_int( 'severity', $t_bug_data->severity ); $t_bug_data->reproducibility = gpc_get_int( 'reproducibility', $t_bug_data->reproducibility ); $t_bug_data->status = gpc_get_int( 'status', $t_bug_data->status ); @@ -62,7 +77,7 @@ $t_bug_data->platform = gpc_get_string( 'platform', $t_bug_data->platform ); $t_bug_data->version = gpc_get_string( 'version', $t_bug_data->version ); $t_bug_data->build = gpc_get_string( 'build', $t_bug_data->build ); - $t_bug_data->fixed_in_version = gpc_get_string( 'fixed_in_version', $t_bug_data->fixed_in_version ); + $t_bug_data->fixed_in_version = gpc_get_string( 'fixed_in_version', $t_bug_data->fixed_in_version ); $t_bug_data->target_version = gpc_get_string( 'target_version', $t_bug_data->target_version ); $t_bug_data->view_state = gpc_get_int( 'view_state', $t_bug_data->view_state ); $t_bug_data->summary = gpc_get_string( 'summary', $t_bug_data->summary ); @@ -73,7 +88,7 @@ $f_private = gpc_get_bool( 'private' ); $f_bugnote_text = gpc_get_string( 'bugnote_text', '' ); - $f_time_tracking = gpc_get_string( 'time_tracking', '0:00' ); + $f_time_tracking = gpc_get_string( 'time_tracking', '0:00' ); $f_close_now = gpc_get_string( 'close_now', false ); # Handle auto-assigning @@ -108,7 +123,7 @@ continue; } - # Only update the field if it is posted + # Only update the field if it is posted # ( will fail in custom_field_set_value(), if it was required ) if ( $t_custom_field_value === null ) { continue; Index: bug_update_advanced_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_update_advanced_page.php,v retrieving revision 1.97 diff -u -r1.97 bug_update_advanced_page.php --- bug_update_advanced_page.php 10 Mar 2007 03:55:11 -0000 1.97 +++ bug_update_advanced_page.php 22 Mar 2007 22:34:50 -0000 @@ -180,8 +180,23 @@ ?> - -   + + + + + + + type="checkbox" name="due"due) echo " checked" ?>> + due_date ) ?> + + @@ -191,7 +206,7 @@ - + + type="checkbox" name="remind"remind) echo " checked" ?>> + remind_date ) ?> + + Index: bug_update_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_update_page.php,v retrieving revision 1.97 diff -u -r1.97 bug_update_page.php --- bug_update_page.php 10 Mar 2007 03:55:12 -0000 1.97 +++ bug_update_page.php 22 Mar 2007 22:02:53 -0000 @@ -184,8 +184,23 @@ ?> - -   + + + + + + + type="checkbox" name="due"due) echo " checked" ?>> + due_date ) ?> + + @@ -195,7 +210,7 @@ - + + type="checkbox" name="remind"remind) echo " checked" ?>> + remind_date ) ?> + + Index: bug_view_advanced_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_view_advanced_page.php,v retrieving revision 1.83 diff -u -r1.83 bug_view_advanced_page.php --- bug_view_advanced_page.php 6 Mar 2007 07:05:18 -0000 1.83 +++ bug_view_advanced_page.php 22 Mar 2007 22:32:48 -0000 @@ -29,6 +29,7 @@ access_ensure_bug_level( VIEWER, $f_bug_id ); $t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) ); + $t_resolved = $t_bug->status >= config_get( 'bug_resolved_status_threshold' ) ? true : false; if( $t_bug->project_id != helper_get_current_project() ) { # in case the current project is not the same project of the bug we are viewing... @@ -76,7 +77,7 @@ @@ -207,8 +208,38 @@ view_state ) ?> - -   + + + + + + reporter_id == auth_get_current_user_id() && !$t_resolved ) { + ?> +
+ + + + type="checkbox" name="due"due) echo " checked" ?>> + due_date ) ?> + + type="submit" class="button" value="" /> +
+ due ) { + echo convert_date( $t_bug->date_due, 'Y-m-d H:i', config_get( 'normal_date_format' ) ); + } else { + echo lang_get ( 'disabled' ); + } + ?> + @@ -218,13 +249,50 @@ - - + handler_id, $f_bug_id ); } ?> + + + handler_id) { ?> + + + + + handler_id == auth_get_current_user_id() && !$t_resolved ) { + ?> +
+ + + + type="checkbox" name="remind"remind) echo " checked" ?>> + remind_date ) ?> + + type="submit" class="button" value="" /> +
+ remind ) { + echo convert_date( $t_bug->date_remind, 'Y-m-d H:i', config_get( 'normal_date_format' ) ); + } else { + echo lang_get ( 'disabled' ); + } + ?> + + + + Index: bug_view_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_view_page.php,v retrieving revision 1.85 diff -u -r1.85 bug_view_page.php --- bug_view_page.php 6 Mar 2007 07:05:18 -0000 1.85 +++ bug_view_page.php 22 Mar 2007 22:30:11 -0000 @@ -32,6 +32,7 @@ access_ensure_bug_level( VIEWER, $f_bug_id ); $t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) ); + $t_resolved = $t_bug->status >= config_get( 'bug_resolved_status_threshold' ) ? true : false; if( $t_bug->project_id != helper_get_current_project() ) { # in case the current project is not the same project of the bug we are viewing... @@ -79,7 +80,7 @@
@@ -210,8 +211,38 @@ view_state ) ?> - -   + + + + + + reporter_id == auth_get_current_user_id() && !$t_resolved ) { + ?> +
+ + + + type="checkbox" name="due"due) echo " checked" ?>> + due_date ) ?> + + type="submit" class="button" value="" /> +
+ due ) { + echo convert_date( $t_bug->date_due, 'Y-m-d H:i', config_get( 'normal_date_format' ) ); + } else { + echo lang_get ( 'disabled' ); + } + ?> + @@ -220,13 +251,50 @@ - - + handler_id, $f_bug_id ); + print_user_with_subject( $t_bug->handler_id, $f_bug_id ); } ?> + + + handler_id) { ?> + + + + + handler_id == auth_get_current_user_id() && !$t_resolved ) { + ?> +
+ + + + type="checkbox" name="remind"remind) echo " checked" ?>> + remind_date ) ?> + + type="submit" class="button" value="" /> +
+ remind ) { + echo convert_date( $t_bug->date_remind, 'Y-m-d H:i', config_get( 'normal_date_format' ) ); + } else { + echo lang_get ( 'disabled' ); + } + ?> + + + + Index: bugnote_add.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bugnote_add.php,v retrieving revision 1.48 diff -u -r1.48 bugnote_add.php --- bugnote_add.php 26 Dec 2006 10:56:06 -0000 1.48 +++ bugnote_add.php 20 Mar 2007 22:40:41 -0000 @@ -23,6 +23,8 @@ $f_private = gpc_get_bool( 'private' ); $f_time_tracking = gpc_get_string( 'time_tracking', '0:00' ); $f_bugnote_text = trim( gpc_get_string( 'bugnote_text', '' ) ); + $f_remind = gpc_get_bool( 'remind' ); + $f_date_remind = trim(gpc_get_date( 'remind_date', config_get( 'short_date_format') ).' '.gpc_get_string( 'remind_time', '09:00' )); if ( bug_is_readonly( $f_bug_id ) ) { error_parameters( $f_bug_id ); @@ -40,12 +42,25 @@ $c_time_tracking = db_prepare_time( $f_time_tracking ); + # Remind date in future? + if ( $f_remind && $f_date_remind < date( 'Y-m-d H:i', time() ) ) { + trigger_error( ERROR_REMIND_DATE, ERROR ); + } + + # Remind date younger than due date? + if ( $f_remind && $t_bug->date_due < $f_date_remind ) { + trigger_error( ERROR_REMIND_DATE_OLDER, ERROR ); + } + + # check for blank bugnote # @@@ VB: Do we want to ban adding a time without an associated note? # @@@ VB: Do we want to differentiate email notifications for normal notes from time tracking entries? if ( !is_blank( $f_bugnote_text ) || ( $c_time_tracking > 0 ) ) { $t_note_type = ( $c_time_tracking > 0 ) ? TIME_TRACKING : BUGNOTE; - bugnote_add( $f_bug_id, $f_bugnote_text, $f_time_tracking, $f_private, $t_note_type ); + if ($t_bug->handler_id != auth_get_current_user_id()) $f_date_remind = null; + else if (!$f_remind) $f_date_remind = ''; + bugnote_add( $f_bug_id, $f_bugnote_text, $f_time_tracking, $f_private, $t_note_type, '', null, $f_date_remind); # only send email if the text is not blank, otherwise, it is just recording of time without a comment. if ( !is_blank( $f_bugnote_text ) ) { Index: bugnote_add_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bugnote_add_inc.php,v retrieving revision 1.29 diff -u -r1.29 bugnote_add_inc.php --- bugnote_add_inc.php 4 Jan 2007 10:07:44 -0000 1.29 +++ bugnote_add_inc.php 22 Mar 2007 22:03:22 -0000 @@ -49,6 +49,26 @@ +handler_id ) { ?> + + + + + + + type="checkbox" name="remind"remind) echo " checked" ?>> + remind_date ) ?> + + + + Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v retrieving revision 1.323 diff -u -r1.323 config_defaults_inc.php --- config_defaults_inc.php 29 Dec 2006 19:24:16 -0000 1.323 +++ config_defaults_inc.php 22 Mar 2007 22:46:46 -0000 @@ -298,7 +298,7 @@ $g_smtp_username = ''; $g_smtp_password = ''; - # It is recommended to use a cronjob or a scheduler task to send emails. + # It is recommended to use a cronjob or a scheduler task to send emails. # The cronjob should typically run every 5 minutes. If no cronjob is used, # then user will have to wait for emails to be sent after performing an action # which triggers notifications. This slows user performance. @@ -464,7 +464,7 @@ # resolution, fixed_in_version, view_state, os, os_build, platform, version, date_submitted, attachment, # category, sponsorship_total, severity, status, last_updated, summary, bugnotes_count $g_view_issues_page_columns = array ( 'selection', 'edit', 'priority', 'id', 'sponsorship_total', 'bugnotes_count', 'attachment', 'category', 'severity', 'status', 'last_updated', 'summary' ); - + # A configuration option that identifies the columns to be show on the print issues page. # In Mantis 1.1, this option can be overriden using the Generic Configuration screen. # This configuration can be overriden dynamically by overriding the custom function "get_columns_to_view". @@ -562,9 +562,9 @@ # date format strings defaults to ISO 8601 formatting # go to http://www.php.net/manual/en/function.date.php # for detailed instructions on date formatting - $g_short_date_format = 'Y-m-d'; - $g_normal_date_format = 'Y-m-d H:i'; - $g_complete_date_format = 'Y-m-d H:i T'; + $g_short_date_format = 'd.m.Y'; + $g_normal_date_format = 'd.m.Y H:i'; + $g_complete_date_format = 'd.m.Y H:i T'; ############################ # Mantis News Settings @@ -610,7 +610,7 @@ # Default bug priority when reporting a new bug $g_default_bug_priority = NORMAL; - + # Default bug reproducibility when reporting a new bug $g_default_bug_reproducibility = REPRODUCIBILITY_HAVENOTTRIED; @@ -826,7 +826,7 @@ $g_ldap_bind_dn = ''; $g_ldap_bind_passwd = ''; $g_use_ldap_email = OFF; # Should we send to the LDAP email address or what MySql tells us - + # The LDAP Protocol Version, if 0, then the protocol version is not set. $g_ldap_protocol_version = 0; @@ -1069,7 +1069,7 @@ # threshold for viewing roadmap $g_roadmap_view_threshold = VIEWER; - + # status change thresholds $g_update_bug_status_threshold = DEVELOPER; @@ -1333,6 +1333,9 @@ $g_custom_field_type_enum_string = '0:string,1:numeric,2:float,3:enum,4:email,5:checkbox,6:list,7:multiselection list,8:date'; + $g_remind_enum_string = '1:disable,2:past,3:future'; + $g_due_enum_string = '1:disable,2:past,3:future'; + ############################# # Mantis Javascript Variables ############################# @@ -1531,7 +1534,7 @@ # Note: # - Extensions must be in lower case # - All icons will be displayed as 16x16 pixels. - $g_file_type_icons = array( + $g_file_type_icons = array( '7z' => 'zip.gif', 'ace' => 'zip.gif', 'arj' => 'zip.gif', @@ -1628,12 +1631,13 @@ # Boxes to be shown and their order # A box that is not to be shown can have its value set to 0 $g_my_view_boxes = array ( - 'assigned' => '1', + 'remind' => '1', 'unassigned' => '2', - 'reported' => '3', + 'assigned' => '3', 'resolved' => '4', - 'recent_mod' => '5', + 'reported' => '5', 'monitored' => '6', + 'recent_mod' => '7', 'feedback' => '0', 'verify' => '0' ); @@ -1653,7 +1657,7 @@ $g_rss_enabled = ON; # This seed is used as part of the inputs for calculating the authentication key for the RSS feeds. - # If this seed changes, all the existing keys for the RSS feeds will become invalid. This is + # If this seed changes, all the existing keys for the RSS feeds will become invalid. This is # defaulted to the database user name, but it is recommended to overwrite it with a specific value # on installation. $g_rss_key_seed = '%db_username%'; @@ -1747,26 +1751,26 @@ ##################### # Wiki Integration ##################### - + # Wiki Integration Enabled? $g_wiki_enable = OFF; # Wiki Engine $g_wiki_engine = 'dokuwiki'; - + # Wiki namespace to be used as root for all pages relating to this mantis installation. $g_wiki_root_namespace = 'mantis'; - + # URL under which the wiki engine is hosted. Must be on the same server. $g_wiki_engine_url = $t_protocol . '://' . $t_host . '/%wiki_engine%/'; - + ##################### # Recently Visited ##################### # Whether to show the most recently visited issues or not. At the moment we always track them even if this flag is off. $g_recently_visited = ON; - + # The maximum number of issues to keep in the recently visited list. $g_recently_visited_count = 5; Index: view_all_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/view_all_inc.php,v retrieving revision 1.166 diff -u -r1.166 view_all_inc.php --- view_all_inc.php 3 Mar 2007 14:58:28 -0000 1.166 +++ view_all_inc.php 21 Mar 2007 00:04:01 -0000 @@ -25,7 +25,7 @@ list( $t_sort, ) = split( ',', $t_filter['sort'] ); list( $t_dir, ) = split( ',', $t_filter['dir'] ); } - + $t_checkboxes_exist = false; $t_icon_path = config_get( 'icon_path' ); @@ -78,7 +78,7 @@ if ( sizeof( $rows ) > 0 ) { if( $t_filter ) $v_start = $t_filter['per_page'] * (int)($f_page_number-1) +1; - else + else $v_start = 1; $v_end = $v_start + sizeof( $rows ) -1; } @@ -129,7 +129,7 @@ # -- Loop over bug rows -- - $t_rows = sizeof( $p_rows ); + $t_rows = sizeof( $p_rows ); for( $i=0; $i < $t_rows; $i++ ) { $t_row = $p_rows[$i]; Index: view_all_set.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/view_all_set.php,v retrieving revision 1.63 diff -u -r1.63 view_all_set.php --- view_all_set.php 17 Dec 2006 10:55:39 -0000 1.63 +++ view_all_set.php 21 Mar 2007 00:56:20 -0000 @@ -32,7 +32,7 @@ } if ( ! in_array( $f_view_type, array( 'simple', 'advanced' ) ) ) { $f_view_type = $f_default_view_type; - } + } # these are all possibly multiple selections for advanced filtering $f_show_category = array(); @@ -83,6 +83,22 @@ $f_handler_id = array( $f_handler_id ); } + $f_show_resolution = array(); + if ( is_array( gpc_get( 'show_remind', null ) ) ) { + $f_show_remind = gpc_get_string_array( 'show_remind', META_FILTER_ANY ); + } else { + $f_show_remind = gpc_get_string( 'show_remind', META_FILTER_ANY ); + $f_show_remind = array( $f_show_remind ); + } + + $f_show_due = array(); + if ( is_array( gpc_get( 'show_due', null ) ) ) { + $f_show_due = gpc_get_string_array( 'show_due', META_FILTER_ANY ); + } else { + $f_show_due = gpc_get_string( 'show_due', META_FILTER_ANY ); + $f_show_due = array( $f_show_due ); + } + $f_project_id = array(); if ( is_array( gpc_get( 'project_id', null ) ) ) { $f_project_id = gpc_get_int_array( 'project_id', META_FILTER_CURRENT ); @@ -122,7 +138,7 @@ $f_fixed_in_version = gpc_get_string( 'fixed_in_version', META_FILTER_ANY ); $f_fixed_in_version = array( $f_fixed_in_version ); } - + $f_target_version = array(); if ( is_array( gpc_get( 'target_version', null ) ) ) { $f_target_version = gpc_get_string_array( 'target_version', META_FILTER_ANY ); @@ -332,8 +348,8 @@ error_proceed_url( 'view_all_set.php?type=0' ); trigger_error( ERROR_FILTER_TOO_OLD, ERROR ); exit; # stop here - } - } + } + } } else { # no cookie found, set it $f_type = 1; @@ -359,6 +375,8 @@ $t_setting_arr['highlight_changed'] = $f_highlight_changed; $t_setting_arr['reporter_id'] = $f_reporter_id; $t_setting_arr['handler_id'] = $f_handler_id; + $t_setting_arr['show_remind'] = $f_show_remind; + $t_setting_arr['show_due'] = $f_show_due; $t_setting_arr['project_id'] = $f_project_id; $t_setting_arr['sort'] = $f_sort; $t_setting_arr['dir'] = $f_dir; @@ -408,13 +426,15 @@ error_proceed_url( 'view_all_set.php?type=0' ); trigger_error( ERROR_FILTER_TOO_OLD, ERROR ); exit; # stop here - } + } break; # Generalise the filter case '4': $t_setting_arr['show_category'] = array( META_FILTER_ANY ); $t_setting_arr['reporter_id'] = array( META_FILTER_ANY ); $t_setting_arr['handler_id'] = array( META_FILTER_ANY ); + $t_setting_arr['show_remind'] = array( META_FILTER_ANY ); + $t_setting_arr['show_due'] = array( META_FILTER_ANY ); $t_setting_arr['show_build'] = array( META_FILTER_ANY ); $t_setting_arr['show_version'] = array( META_FILTER_ANY ); $t_setting_arr['show_priority'] = array( META_FILTER_ANY ); Index: view_filters_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/view_filters_page.php,v retrieving revision 1.43 diff -u -r1.43 view_filters_page.php --- view_filters_page.php 15 Aug 2006 07:11:23 -0000 1.43 +++ view_filters_page.php 21 Mar 2007 00:31:58 -0000 @@ -118,7 +118,7 @@ if ( ! in_array( $t_target_field, $t_fields ) ) { $t_target_field = ''; } - + $f_for_screen = gpc_get_bool( 'for_screen', true ); $t_action = "view_all_set.php?f=3"; @@ -141,7 +141,7 @@ } if ( ! in_array( $f_view_type, array( 'simple', 'advanced' ) ) ) { $f_view_type = $f_default_view_type; - } + } $t_select_modifier = ''; if ( 'advanced' == $f_view_type ) { @@ -222,6 +222,43 @@ +   +   + + +   +   +   + + + + +   + + +   + + + + + + + + + + +   + + +   + + +   + + + + + severity ); $c_reproducibility = db_prepare_int( $p_bug_data->reproducibility ); $c_category = db_prepare_string( $p_bug_data->category ); + $c_due = db_prepare_int( $p_bug_data->due ); + $c_date_due = db_prepare_string( $p_bug_data->date_due ); + $c_remind = db_prepare_int( $p_bug_data->remind ); + $c_date_remind = db_prepare_string( $p_bug_data->date_remind ); $c_os = db_prepare_string( $p_bug_data->os ); $c_os_build = db_prepare_string( $p_bug_data->os_build ); $c_platform = db_prepare_string( $p_bug_data->platform ); @@ -363,7 +371,7 @@ error_parameters( lang_get( 'description' ) ); trigger_error( ERROR_EMPTY_FIELD, ERROR ); } - + if ( is_blank( $c_category ) ) { error_parameters( lang_get( 'category' ) ); trigger_error( ERROR_EMPTY_FIELD, ERROR ); @@ -420,12 +428,13 @@ status, resolution, projection, category, date_submitted, last_updated, + due, date_due, eta, bug_text_id, os, os_build, platform, version, build, profile_id, summary, view_state, sponsorship_total, sticky, fixed_in_version, - target_version + target_version ) VALUES ( '$c_project_id', @@ -435,6 +444,7 @@ '$t_status', '$t_resolution', 10, '$c_category', " . db_now() . "," . db_now() . ", + $c_due, '$c_date_due', 10, '$t_text_id', '$c_os', '$c_os_build', '$c_platform', '$c_version', @@ -675,7 +685,7 @@ email_bug_deleted( $p_bug_id ); - # call post-deletion custom function. We call this here to allow the custom function to access the details of the bug before + # call post-deletion custom function. We call this here to allow the custom function to access the details of the bug before # they are deleted from the database given it's id. The other option would be to move this to the end of the function and # provide it with bug data rather than an id, but this will break backward compatibility. helper_call_custom_function( 'issue_delete_notify', array( $f_bug_id ) ); @@ -778,6 +788,17 @@ $t_bug_table = config_get( 'mantis_bug_table' ); + # Reminder OFF if no Handler + if (!$c_bug_data->handler_id ) { + $c_bug_data->remind = ''; + } + + # Reminder and Due OFF if resolved + if ($c_bug_data->status >= config_get( 'bug_resolved_status_threshold' ) ) { + $c_bug_data->due = ''; + $c_bug_data->remind = ''; + } + # Update all fields # Ignore date_submitted and last_updated since they are pulled out # as unix timestamps which could confuse the history log and they @@ -789,6 +810,10 @@ handler_id='$c_bug_data->handler_id', duplicate_id='$c_bug_data->duplicate_id', priority='$c_bug_data->priority', + due='$c_bug_data->due', + date_due='$c_bug_data->date_due', + remind='$c_bug_data->remind', + date_remind='$c_bug_data->date_remind', severity='$c_bug_data->severity', reproducibility='$c_bug_data->reproducibility', status='$c_bug_data->status', @@ -1032,8 +1057,8 @@ $c_bug_id = db_prepare_int( $p_bug_id ); if( !is_null( $g_cache_bug[ $c_bug_id ]['_stats'] ) ) { - if( $g_cache_bug[ $c_bug_id ]['_stats'] === false ) { - return false; + if( $g_cache_bug[ $c_bug_id ]['_stats'] === false ) { + return false; } else { $t_stats['last_modified'] = db_unixtimestamp( $g_cache_bug[ $c_bug_id ]['_stats']['last_modified'] ); $t_stats['count'] = $g_cache_bug[ $c_bug_id ]['_stats']['count']; @@ -1316,6 +1341,28 @@ } # -------------------- + # updates the date remind field + function bug_update_date_remind( $p_bug_id, $p_date_remind) { + $p_date_remind = trim($p_date_remind); + + $c_bug_id = db_prepare_int( $p_bug_id ); + $c_date_remind = db_prepare_string ( $p_date_remind ); + + $c_remind = empty($c_date_remind) ? 0 : 1; + + $t_bug_table = config_get( 'mantis_bug_table' ); + + $query = "UPDATE $t_bug_table + SET remind='$c_remind', date_remind='$c_date_remind' + WHERE id='$c_bug_id'"; + db_query( $query ); + + bug_clear_cache( $p_bug_id ); + + return true; + } + + # -------------------- # enable monitoring of this bug for the user function bug_monitor( $p_bug_id, $p_user_id ) { $c_bug_id = db_prepare_int( $p_bug_id ); @@ -1396,6 +1443,10 @@ $t_bug_data->category = db_prepare_string( $p_bug_data->category ); $t_bug_data->date_submitted = db_prepare_string( $p_bug_data->date_submitted ); $t_bug_data->last_updated = db_prepare_string( $p_bug_data->last_updated ); + $t_bug_data->due = db_prepare_int( $p_bug_data->due ); + $t_bug_data->date_due = db_prepare_string( $p_bug_data->date_due ); + $t_bug_data->remind = db_prepare_int( $p_bug_data->remind ); + $t_bug_data->date_remind = db_prepare_string( $p_bug_data->date_remind ); $t_bug_data->eta = db_prepare_int( $p_bug_data->eta ); $t_bug_data->os = db_prepare_string( $p_bug_data->os ); $t_bug_data->os_build = db_prepare_string( $p_bug_data->os_build ); @@ -1423,6 +1474,14 @@ $p_bug_data->category = string_attribute( $p_bug_data->category ); $p_bug_data->date_submitted = string_attribute( $p_bug_data->date_submitted ); $p_bug_data->last_updated = string_attribute( $p_bug_data->last_updated ); + + list($date, $time) = split(' ', $p_bug_data->date_due ); + $p_bug_data->due_date = convert_date( $date, 'Y-m-d', config_get( 'short_date_format' ) ); + $p_bug_data->due_time = substr( $time, 0, 5 ); + list($date, $time) = split(' ', $p_bug_data->date_remind ); + $p_bug_data->remind_date = convert_date( $date, 'Y-m-d', config_get( 'short_date_format' ) ); + $p_bug_data->remind_time = substr( $time, 0, 5 ); + $p_bug_data->os = string_attribute( $p_bug_data->os ); $p_bug_data->os_build = string_attribute( $p_bug_data->os_build ); $p_bug_data->platform = string_attribute( $p_bug_data->platform ); @@ -1444,9 +1503,18 @@ # Return a copy of the bug structure with all the instvars prepared for editing # in an HTML form function bug_prepare_display( $p_bug_data ) { + $p_bug_data->category = string_display( $p_bug_data->category ); $p_bug_data->date_submitted = string_display( $p_bug_data->date_submitted ); $p_bug_data->last_updated = string_display( $p_bug_data->last_updated ); + + list($date, $time) = split(' ', $p_bug_data->date_due ); + $p_bug_data->due_date = convert_date( $date, 'Y-m-d', config_get( 'short_date_format' ) ); + $p_bug_data->due_time = substr( $time, 0, 5 ); + list($date, $time) = split(' ', $p_bug_data->date_remind ); + $p_bug_data->remind_date = convert_date( $date, 'Y-m-d', config_get( 'short_date_format' ) ); + $p_bug_data->remind_time = substr( $time, 0, 5 ); + $p_bug_data->os = string_display( $p_bug_data->os ); $p_bug_data->os_build = string_display( $p_bug_data->os_build ); $p_bug_data->platform = string_display( $p_bug_data->platform ); Index: core/bugnote_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/bugnote_api.php,v retrieving revision 1.41 diff -u -r1.41 bugnote_api.php --- core/bugnote_api.php 7 Mar 2007 10:40:00 -0000 1.41 +++ core/bugnote_api.php 20 Mar 2007 00:03:34 -0000 @@ -87,7 +87,7 @@ # Add a bugnote to a bug # # return the ID of the new bugnote - function bugnote_add ( $p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_private = false, $p_type = 0, $p_attr = '', $p_user_id = null ) { + function bugnote_add ( $p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_private = false, $p_type = 0, $p_attr = '', $p_user_id = null, $p_date_remind = null) { $c_bug_id = db_prepare_int( $p_bug_id ); $c_bugnote_text = db_prepare_string( $p_bugnote_text ); $c_time_tracking = db_prepare_time( $p_time_tracking ); @@ -133,6 +133,11 @@ # get bugnote id $t_bugnote_id = db_insert_id( $t_bugnote_table ); + # update bug date remind + if (!is_null($p_date_remind)) { + bug_update_date_remind ( $p_bug_id, $p_date_remind ); + } + # update bug last updated bug_update_date( $p_bug_id ); Index: core/date_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/date_api.php,v retrieving revision 1.8 diff -u -r1.8 date_api.php --- core/date_api.php 18 May 2006 13:00:28 -0000 1.8 +++ core/date_api.php 22 Mar 2007 20:58:55 -0000 @@ -16,6 +16,29 @@ function print_date( $p_format, $p_date ) { PRINT date( $p_format, $p_date ); } + + # -------------------- + # convert the date from given format + function convert_date( $p_date, $p_format_from, $p_format_to = 'Y-m-d H:i:s') { + preg_match_all("/([YmdHis])/", $p_format_from, $order); + + $c_format_from = $p_format_from; + foreach( $order[0] as $key ){ + if ($key == "Y") $l = 4; + else $l = 2; + + $c_format_from = str_replace($key, "(.{".$l."})", $c_format_from); + } + + preg_match("/$c_format_from/", $p_date, $matches); + + $c_date = $p_format_to; + foreach( $order[0] as $pos => $key ){ + $c_date = str_replace($key, $matches[$pos+1], $c_date); + } + + return $c_date; + } # -------------------- function print_month_option_list( $p_month = 0 ) { for ($i=1; $i<=12; $i++) { @@ -135,4 +158,21 @@ } } } + # -------------------- + + function print_date_calendar( $field_name, $f_date ) { + $format = preg_replace( "=([Ymd])=", "%\$1", config_get( 'short_date_format' ) ); + + echo ''; + echo ''; + echo ''; + } ?> Index: core/filter_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/filter_api.php,v retrieving revision 1.150 diff -u -r1.150 filter_api.php --- core/filter_api.php 13 Mar 2007 06:06:58 -0000 1.150 +++ core/filter_api.php 22 Mar 2007 22:49:56 -0000 @@ -35,6 +35,8 @@ 'highlight_changed' => $t_default_show_changed, 'reporter_id' => Array ( '0' => META_FILTER_ANY ), 'handler_id' => Array ( '0' => META_FILTER_ANY ), + 'show_remind' => Array ( '0' => META_FILTER_ANY ), + 'show_due' => Array ( '0' => META_FILTER_ANY ), 'project_id' => Array ( '0' => META_FILTER_CURRENT ), 'show_resolution' => Array ( '0' => META_FILTER_ANY ), 'show_build' => Array ( '0' => META_FILTER_ANY ), @@ -154,7 +156,7 @@ $t_all_projects_found = false; $t_new_project_ids = array(); foreach ( $t_project_ids as $t_pid ) { - if ( $t_pid == META_FILTER_CURRENT ) { + if ( $t_pid == META_FILTER_CURRENT ) { $t_pid = $t_project_id; } @@ -183,7 +185,7 @@ } else { $t_project_ids = $t_new_project_ids; } - + if ( $t_projects_query_required ) { // expand project ids to include sub-projects if ( $t_include_sub_projects ) { @@ -244,7 +246,7 @@ } // both queries can't be null, so we either have one of them or both. - + if ( $t_private_and_public_query === null ) { $t_project_query = $t_public_only_query; } else if ( $t_public_only_query === null ) { @@ -295,7 +297,7 @@ } } } - + if ( 1 < count( $t_clauses ) ) { $t_reporter_query = "( $t_bug_table.reporter_id in (". implode( ', ', $t_clauses ) .") )"; } else { @@ -344,7 +346,7 @@ } } } - + if ( 1 < count( $t_clauses ) ) { $t_handler_query = "( $t_bug_table.handler_id in (". implode( ', ', $t_clauses ) .") )"; } else { @@ -357,6 +359,60 @@ log_event( LOG_FILTERING, 'FILTERING: no handler query' ); } + # due + $t_any_found = false; + + foreach( $t_filter['show_due'] as $t_filter_member ) { + if ( ( META_FILTER_ANY == $t_filter_member ) && ( is_numeric( $t_filter_member ) ) ) { + $t_any_found = true; + } + } + if ( count( $t_filter['show_due'] ) == 0 ) { + $t_any_found = true; + } + if ( !$t_any_found ) { + $t_clauses = array(); + + foreach( $t_filter['show_due'] as $t_filter_member ) { + if (1 == $t_filter_member) array_push( $t_clauses, "due=0" ); + if (2 == $t_filter_member) array_push( $t_clauses, "due=1 and $t_bug_table.date_due < now()" ); + if (3 == $t_filter_member) array_push( $t_clauses, "due=1 and $t_bug_table.date_due > now()" ); + } + + if ( 1 < count( $t_clauses ) ) { + array_push( $t_where_clauses, "( (". implode( ' ) or ( ', $t_clauses ) .") )" ); + } else { + array_push( $t_where_clauses, "( $t_clauses[0] )" ); + } + } + + # remind + $t_any_found = false; + + foreach( $t_filter['show_remind'] as $t_filter_member ) { + if ( ( META_FILTER_ANY == $t_filter_member ) && ( is_numeric( $t_filter_member ) ) ) { + $t_any_found = true; + } + } + if ( count( $t_filter['show_remind'] ) == 0 ) { + $t_any_found = true; + } + if ( !$t_any_found ) { + $t_clauses = array(); + + foreach( $t_filter['show_remind'] as $t_filter_member ) { + if (1 == $t_filter_member) array_push( $t_clauses, "remind=0" ); + if (2 == $t_filter_member) array_push( $t_clauses, "remind=1 and $t_bug_table.date_remind < now()" ); + if (3 == $t_filter_member) array_push( $t_clauses, "remind=1 and $t_bug_table.date_remind > now()" ); + } + + if ( 1 < count( $t_clauses ) ) { + array_push( $t_where_clauses, "( (". implode( ' ) or ( ', $t_clauses ) .") )" ); + } else { + array_push( $t_where_clauses, "( $t_clauses[0] )" ); + } + } + # category $t_any_found = false; @@ -670,7 +726,7 @@ array_push( $t_clauses, "'$c_target_version'" ); } } - + #echo var_dump( $t_clauses ); exit; if ( 1 < count( $t_clauses ) ) { array_push( $t_where_clauses, "( $t_bug_table.target_version in (". implode( ', ', $t_clauses ) .") )" ); @@ -818,7 +874,7 @@ $c_search = db_prepare_string( $t_filter['search'] ); $c_search_int = db_prepare_int( $t_filter['search'] ); $t_textsearch_where_clause = '(' . db_helper_like( 'summary', "%$c_search%" ) . - ' OR ' . db_helper_like( "$t_bug_text_table.description", "%$c_search%" ) . + ' OR ' . db_helper_like( "$t_bug_text_table.description", "%$c_search%" ) . ' OR ' . db_helper_like( "$t_bug_text_table.steps_to_reproduce", "%$c_search%" ) . ' OR ' . db_helper_like( "$t_bug_text_table.additional_information", "%$c_search%" ) . " OR ( $t_bug_table.id = '$c_search_int' ) )"; @@ -946,7 +1002,7 @@ if ( ( 'on' == $t_filter['sticky_issues'] ) && ( NULL !== $p_show_sticky ) ) { $t_order_array[] = "sticky DESC"; } - + $t_join = ''; for ( $i=0; $i < count( $t_sort_fields ); $i++ ) { $c_sort = db_prepare_string( $t_sort_fields[$i] ); @@ -1005,24 +1061,24 @@ $row_count = db_num_rows( $result2 ); $t_id_array_lastmod = array(); - + for ( $i=0 ; $i < $row_count ; $i++ ) { $row = db_fetch_array( $result2 ); $t_id_array_lastmod[] = db_prepare_int ( $row['id'] ); - + $row['date_submitted'] = db_unixtimestamp ( $row['date_submitted'] ); $row['last_updated'] = db_unixtimestamp ( $row['last_updated'] ); - + array_push( $rows, $row ); } $t_id_array_lastmod = array_unique( $t_id_array_lastmod ); - + // paulr: it should be impossible for t_id_array_lastmod to be array(): // that would imply that $t_id_array is null which aborts this function early //if ( count( $t_id_array_lastmod ) > 0 ) { $t_where = "WHERE $t_bugnote_table.bug_id in (" . implode( ", ", $t_id_array_lastmod ) . ")"; - + $query3 = "SELECT DISTINCT bug_id,MAX(last_modified) as last_modified, COUNT(last_modified) as count FROM $t_bugnote_table $t_where GROUP BY bug_id"; # perform query @@ -1032,7 +1088,7 @@ for ( $i=0 ; $i < $row_count ; $i++ ) { $row = db_fetch_array( $result3 ); - + $t_stats[ $row['bug_id'] ] = $row; } @@ -1208,9 +1264,9 @@ || ( ( AUTO == config_get( 'show_product_version' ) ) && ( count( version_get_all_rows_with_subs( $t_project_id ) ) > 0 ) ); # overload handler_id setting if user isn't supposed to see them (ref #6189) - if ( ! access_has_project_level( config_get( 'view_handler_threshold' ), $t_project_id ) ) { - $t_filter['handler_id'] = array( META_FILTER_ANY ); - } + if ( ! access_has_project_level( config_get( 'view_handler_threshold' ), $t_project_id ) ) { + $t_filter['handler_id'] = array( META_FILTER_ANY ); + } ?> > @@ -1376,7 +1432,7 @@ > +   + + +   + + + : + + + : + + +   + + +   + + +   + + 8 ) { + echo ' '; + } ?> + + + + +   + + +   + + + + + '; + } else { + $t_first_flag = false; + } + $t_output = $t_output . $t_this_string; + } + if ( true == $t_any_found ) { + PRINT lang_get( 'any' ); + } else { + PRINT $t_output; + } + } + ?> + + + + + '; + } else { + $t_first_flag = false; + } + $t_output = $t_output . $t_this_string; + } + if ( true == $t_any_found ) { + PRINT lang_get( 'any' ); + } else { + PRINT $t_output; + } + } + ?> + + +   + + +   + + +   + + 8 ) { + echo ' '; + } ?> + + + > + : @@ -1628,7 +1798,7 @@ " /> " /> " /> - 6 ) { echo ' '; } @@ -2215,7 +2385,7 @@ if ( $t_filter_cols > 3 ) { echo ' '; } - } + } ?> 'int', 'show_build' => 'string', 'show_version' => 'string', + 'show_remind' => 'string', + 'show_due' => 'string', 'hide_status' => 'int', 'fixed_in_version' => 'string', 'target_version' => 'string', @@ -2898,6 +3070,26 @@ + + + + Index: core/gpc_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/gpc_api.php,v retrieving revision 1.39 diff -u -r1.39 gpc_api.php --- core/gpc_api.php 13 Jul 2005 20:45:02 -0000 1.39 +++ core/gpc_api.php 20 Mar 2007 21:34:18 -0000 @@ -96,6 +96,53 @@ } } + # ------------------ + # Retrieve a date GPC variable. Uses gpc_get(). + # If you pass in *no* default, false will be used + function gpc_get_date( $p_var_name, $p_format = 'Y-m-d H:i', $p_default = false ) { + $t_result = gpc_get( $p_var_name, $p_default ); + + if ( $t_result === $p_default ) { + return $p_default; + } else { + if ( is_array( $t_result ) ) { + error_parameters( $p_var_name ); + trigger_error( ERROR_GPC_ARRAY_UNEXPECTED, ERROR ); + } + + // Builds up date pattern from the given $format, keeping delimiters in place. + if( !preg_match_all( "/([YmdHi])([^YmdHi])*/", $p_format, $formatTokens, PREG_SET_ORDER ) ) { + return false; + } + foreach( $formatTokens as $formatToken ) { + $delimiter = preg_quote( $formatToken[2], "/" ); + $datePattern .= "(.*)".$delimiter; + } + + // Splits up the given $date + if( !preg_match( "/".$datePattern."/", $t_result, $dateTokens) ) { + return false; + } + $dateSegments = array(); + for($i = 0; $i < count($formatTokens); $i++) { + $dateSegments[$formatTokens[$i][1]] = $dateTokens[$i+1]; + } + + // Reformats the given $date into US English date format, suitable for strtotime() + if( $dateSegments["Y"] && $dateSegments["m"] && $dateSegments["d"] ) { + $dateReformated = $dateSegments["Y"]."-".$dateSegments["m"]."-".$dateSegments["d"]; + } + else { + return false; + } + if( $dateSegments["H"] && $dateSegments["i"] ) { + $dateReformated .= " ".$dateSegments["H"].":".$dateSegments["i"]; + } + + return $dateReformated; + } + } + #=================================== # Custom Field Functions #=================================== Index: core/html_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/html_api.php,v retrieving revision 1.203 diff -u -r1.203 html_api.php --- core/html_api.php 6 Mar 2007 07:05:19 -0000 1.203 +++ core/html_api.php 22 Mar 2007 20:34:51 -0000 @@ -258,6 +258,10 @@ echo '' . "\n"; echo "\t" . '' . "\n"; + echo "\t" . '' . "\n"; + echo "\t" . '' . "\n"; + echo "\t" . '' . "\n"; + echo "\t" . '' . "\n"; } } @@ -899,22 +903,22 @@ if ( null === $p_fields ) { $p_fields = array(); } - + if ( strtolower( $p_method ) == 'get' ) { $t_method = 'get'; } else { $t_method = 'post'; } - + PRINT "
\n"; - + foreach ( $p_fields as $key => $val ) { $key = string_attribute( $key ); $val = string_attribute( $val ); - + PRINT " \n"; } - + PRINT " \n"; PRINT "
\n"; } Index: core/my_view_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/my_view_inc.php,v retrieving revision 1.17 diff -u -r1.17 my_view_inc.php --- core/my_view_inc.php 18 May 2006 06:32:19 -0000 1.17 +++ core/my_view_inc.php 21 Mar 2007 01:23:58 -0000 @@ -156,6 +156,22 @@ ); $url_link_parameters['verify'] = 'reporter_id=' . $t_current_user_id . '&show_status=' . $t_bug_resolved_status_threshold; + $c_filter['remind'] = array( + 'show_category' => Array ( '0' => META_FILTER_ANY ), + 'show_severity' => Array ( '0' => META_FILTER_ANY ), + 'show_status' => Array ( '0' => META_FILTER_ANY ), + 'highlight_changed' => $t_default_show_changed, + 'reporter_id' => Array ( '0' => META_FILTER_ANY ), + 'handler_id' => Array ( '0' => $t_current_user_id ), + 'show_remind' => Array ( '0' => 2), + 'show_resolution' => Array ( '0' => META_FILTER_ANY ), + 'show_build' => Array ( '0' => META_FILTER_ANY ), + 'show_version' => Array ( '0' => META_FILTER_ANY ), + 'hide_status' => Array ( '0' => $t_hide_status_default ), + 'user_monitor' => Array ( '0' => META_FILTER_ANY ) + ); + $url_link_parameters['remind'] = 'handler_id=' . $t_current_user_id . '&hide_status=' .$t_hide_status_default. '&show_remind=2'; + $rows = filter_get_bug_rows ( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $c_filter[$t_box_title] ); $box_title = lang_get( 'my_view_title_' . $t_box_title ); Index: core/user_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/user_api.php,v retrieving revision 1.108 diff -u -r1.108 user_api.php --- core/user_api.php 6 Mar 2007 07:05:19 -0000 1.108 +++ core/user_api.php 21 Mar 2007 00:12:24 -0000 @@ -299,8 +299,8 @@ return $t_users; } - - + + # -------------------- # Return an array of user ids that are logged in. # A user is considered logged in if the last visit timestamp is within the @@ -655,7 +655,7 @@ global $g_user_accessible_projects_cache; if ( null !== $g_user_accessible_projects_cache - && auth_get_current_user_id() == $p_user_id + && auth_get_current_user_id() == $p_user_id && false == $p_show_disabled ) { return $g_user_accessible_projects_cache; } @@ -727,7 +727,7 @@ global $g_user_accessible_subprojects_cache; if ( null !== $g_user_accessible_subprojects_cache - && auth_get_current_user_id() == $p_user_id + && auth_get_current_user_id() == $p_user_id && false == $p_show_disabled ) { if ( isset( $g_user_accessible_subprojects_cache[ $p_project_id ] ) ) { return $g_user_accessible_subprojects_cache[ $p_project_id ]; Index: lang/strings_english.txt =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_english.txt,v retrieving revision 1.290 diff -u -r1.290 strings_english.txt --- lang/strings_english.txt 10 Mar 2007 04:30:19 -0000 1.290 +++ lang/strings_english.txt 22 Mar 2007 22:47:27 -0000 @@ -270,6 +270,9 @@ $MANTIS_ERROR[ERROR_PROJECT_RECURSIVE_HIERARCHY] = 'That operation would create a loop in the subproject hierarchy.'; $MANTIS_ERROR[ERROR_USER_CHANGE_LAST_ADMIN] = 'You cannot change the access level of the only ADMINISTRATOR in the system.'; $MANTIS_ERROR[ERROR_PAGE_REDIRECTION] = 'Page redirection error, ensure that there are no spaces outside the PHP block (<?php ?>) in config_inc.php or custom_*.php files.'; +$MANTIS_ERROR[ERROR_DUE_DATE] = 'The due date must be in future.'; +$MANTIS_ERROR[ERROR_REMIND_DATE] = 'The remind date must be in future.'; +$MANTIS_ERROR[ERROR_REMIND_DATE_OLDER] = 'The remind date must be younger than due date.'; $s_login_error = 'Your account may be disabled or blocked or the username/password you entered is incorrect.'; $s_login_cookies_disabled = 'Your browser either doesn\'t know how to handle cookies, or refuses to handle them.'; @@ -304,6 +307,9 @@ $s_eta_enum_string = '10:none,20:< 1 day,30:2-3 days,40:< 1 week,50:< 1 month,60:> 1 month'; $s_sponsorship_enum_string = '0:Unpaid,1:Requested,2:Paid'; +$s_remind_enum_string = '1:disable,2:past,3:future'; +$s_due_enum_string = '1:disable,2:past,3:future'; + # Email Strings $s_new_account_subject = 'Account registration'; $s_new_account_greeting = 'Thank you for registering. You have account with username \''; @@ -569,6 +575,11 @@ $s_reporter = 'Reporter'; $s_assigned_to = 'Assigned To'; $s_priority = 'Priority'; +$s_remind = 'Date Remind'; +$s_remind_update_button = 'Change Remind'; +$s_disabled = 'disabled'; +$s_due = 'Date Due'; +$s_due_update_button = 'Change Due-Date'; $s_resolution = 'Resolution'; $s_status = 'Status'; $s_duplicate_id = 'Duplicate ID'; @@ -905,6 +916,7 @@ $s_my_view_title_monitored = 'Monitored by Me'; $s_my_view_title_feedback = 'Awaiting Feedback from Me'; $s_my_view_title_verify = 'Awaiting Confirmation of Resolution from Me'; +$s_my_view_title_remind = 'Remind'; # news_add.php $s_news_added_msg = 'News item added...'; Index: lang/strings_german.txt =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_german.txt,v retrieving revision 1.150 diff -u -r1.150 strings_german.txt --- lang/strings_german.txt 30 Dec 2006 09:11:22 -0000 1.150 +++ lang/strings_german.txt 22 Mar 2007 22:47:16 -0000 @@ -273,6 +273,9 @@ $MANTIS_ERROR[ERROR_PROJECT_RECURSIVE_HIERARCHY] = 'Diese Operation würde eine Schleife in der Unterprojekthierarchie erzeugen.'; $MANTIS_ERROR[ERROR_USER_CHANGE_LAST_ADMIN] = 'Sie können die Zugangsrechte des einzigen System-ADMINISTRATORS nicht ändern.'; $MANTIS_ERROR[ERROR_PAGE_REDIRECTION] = 'Page redirection error, ensure that there are no spaces outside the PHP block (<?php ?>) in config_inc.php or custom_*.php files.'; +$MANTIS_ERROR[ERROR_DUE_DATE] = 'Das Fällig Datum muss in der Zukunft liegen.'; +$MANTIS_ERROR[ERROR_REMIND_DATE] = 'Das Erinnerungsdatum muss in der Zukunft liegen.'; +$MANTIS_ERROR[ERROR_REMIND_DATE_OLDER] = 'Das Erinnerungsdatum darf nicht später als das Fällig Datum sein.'; $s_login_error = 'Ihr Konto ist deaktiviert oder gesperrt (aufgrund von zu vielen fehlgeschlagenen Anmeldeversuchen) oder der eigegebene Benutzer/Password ist falsch.'; $s_login_cookies_disabled = 'Ihr Web-Browser akzeptiert keine Cookies.'; @@ -307,6 +310,9 @@ $s_eta_enum_string = '10:keine,20:< 1 Tag,30:2-3 Tage,40:< 1 Woche,50:< 1 Monat,60:> 1 Monat'; $s_sponsorship_enum_string = '0:Unbezahlt,1:Gefordert,2:Bezahlt'; +$s_remind_enum_string = '1:ohne Erinnerung,2:in der Vergangenheit,3:in der Zukunft'; +$s_due_enum_string = '1:ohne Fälligkeit,2:Vergangenheit,3:Zukunft'; + # Email Strings $s_new_account_subject = 'Konto Registrierung'; $s_new_account_greeting = 'Danke für ihre Registrierung. Ihr Konto hat den Benutzernamen \''; @@ -572,6 +578,11 @@ $s_reporter = 'Reporter'; $s_assigned_to = 'Bearbeitung durch'; $s_priority = 'Priorität'; +$s_remind = 'Erinnerung'; +$s_remind_update_button = 'Erinnerung ändern'; +$s_disabled = 'deaktiviert'; +$s_due = 'Fällig'; +$s_due_update_button = 'Fälligkeit ändern'; $s_resolution = 'Lösung'; $s_status = 'Status'; $s_duplicate_id = 'ID doppelt'; @@ -908,6 +919,7 @@ $s_my_view_title_monitored = 'Von mir beobachtet'; $s_my_view_title_feedback = 'Warte auf Rückmeldung von MIR'; $s_my_view_title_verify = 'Warte auf Bestätigung der Lösung durch MICH'; +$s_my_view_title_remind = 'Erinnerungen'; # news_add.php $s_news_added_msg = 'Nachricht hinzugefügt...';