View Issue Details

IDProjectCategoryView StatusLast Update
0010153Plugin - ReminderGeneralpublic2016-06-29 02:00
Reportercas Assigned Tocas  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Summary0010153: Reminder plugin
Description

This plugin allows for sending an email to a handler once the due_date is within a defibale number of days.
This plugin can/will be extended with additional reminder functionality

Additional Information

We are using Due dates very heavily in our environment.
In order to stay current and achieve a high percentage On time resolving, I wanted my developers to be informed about forthcoming Due dates.

This plugin is build upon version 1.2.x of mantis and should be installed as any other plugin
No Mantis scripts or tables are being altered.

It also contains scripts which can be scheduled using a cronjob and/or windows scheduler.
For the various config options see docs\readme.txt

This addon is distributed under the same conditions as Mantis itself.

Cas Nuy February 2009

Tagsplugin, reminder
Attached Files
Reminder091.zip (4,429 bytes)
Reminder10.zip (7,653 bytes)
ErrorReminder.JPG (107,850 bytes)   
ErrorReminder.JPG (107,850 bytes)   
Reminder.103.zip (10,580 bytes)
Reminder.104.zip (10,588 bytes)
Reminder.105.zip (10,573 bytes)
Reminder.106.zip (10,612 bytes)
Reminder.107.zip (14,008 bytes)
Reminder.108.zip (12,922 bytes)
Reminder.109.zip (13,217 bytes)
Reminder.110.zip (13,352 bytes)
Reminder.111.zip (14,834 bytes)
bug_report_page.txt (13,652 bytes)   
<?php
# Mantis - a php based bugtracking system

# Mantis 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.
#
# Mantis 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 Mantis.  If not, see <http://www.gnu.org/licenses/>.

	/**
	 * This file POSTs data to report_bug.php
	 * @package MantisBT
	 * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
	 * @copyright Copyright (C) 2002 - 2009  Mantis Team   - mantisbt-dev@lists.sourceforge.net
	 * @link http://www.mantisbt.org
	 */
	 
	 $g_allow_browser_cache = 1;
	 
	 /**
	  * Mantis Core API's
	  */
	require_once( 'core.php' );

	$t_core_path = config_get( 'core_path' );

	require_once( $t_core_path.'file_api.php' );
	require_once( $t_core_path.'custom_field_api.php' );
	require_once( $t_core_path.'last_visited_api.php' );

	$f_master_bug_id = gpc_get_int( 'm_id', 0 );

	# this page is invalid for the 'All Project' selection except if this is a clone
	if ( ( ALL_PROJECTS == helper_get_current_project() ) && ( 0 == $f_master_bug_id ) ) {
		print_header_redirect( 'login_select_proj_page.php?ref=bug_report_page.php' );
	}

	if ( ADVANCED_ONLY == config_get( 'show_report' ) ) {
		print_header_redirect ( 'bug_report_advanced_page.php' .
				( 0 == $f_master_bug_id ) ? '' : '?m_id=' . $f_master_bug_id );
	}

	if( $f_master_bug_id > 0 ) {
		# master bug exists...
		bug_ensure_exists( $f_master_bug_id );

		# master bug is not read-only...
		if ( bug_is_readonly( $f_master_bug_id ) ) {
			error_parameters( $f_master_bug_id );
			trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR );
		}

		$t_bug = bug_prepare_edit( bug_get( $f_master_bug_id, true ) );

		# the user can at least update the master bug (needed to add the relationship)...
		access_ensure_bug_level( config_get( 'update_bug_threshold', null, $t_bug->project_id ), $f_master_bug_id );

		#@@@ (thraxisp) Note that the master bug is cloned into the same project as the master, independent of
		#       what the current project is set to.
		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...
            # ... override the current project. This to avoid problems with categories and handlers lists etc.
            $g_project_override = $t_bug->project_id;
            $t_changed_project = true;
        } else {
            $t_changed_project = false;
        }

	    access_ensure_project_level( config_get( 'report_bug_threshold' ) );

	    $f_product_version		= $t_bug->version;
		$f_category_id			= $t_bug->category_id;
		$f_reproducibility		= $t_bug->reproducibility;
		$f_severity				= $t_bug->severity;
		$f_priority				= $t_bug->priority;
		$f_summary				= $t_bug->summary;
		$f_description			= $t_bug->description;
		$f_additional_info		= $t_bug->additional_information;
		$f_view_state			= $t_bug->view_state;

		$t_project_id			= $t_bug->project_id;
	} else {
	    access_ensure_project_level( config_get( 'report_bug_threshold' ) );

		$f_product_version		= gpc_get_string( 'product_version', '' );
		$f_category_id			= gpc_get_int( 'category_id', 0 );
		$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_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' ) );
		$f_view_state			= gpc_get_int( 'view_state', config_get( 'default_bug_view_status' ) );

		$t_project_id			= helper_get_current_project();

		$t_changed_project		= false;
	}

	$f_report_stay			= gpc_get_bool( 'report_stay', false );

	# don't index bug report page
	html_robots_noindex();

	html_page_top1( lang_get( 'report_bug_link' ) );
	html_page_top2();

	print_recently_visited();
?>

<br />
<div align="center">
<form name="report_bug_form" method="post" <?php if ( file_allow_bug_upload() ) { echo 'enctype="multipart/form-data"'; } ?> action="bug_report.php">
<?php echo form_security_field( 'bug_report' ) ?>
<table class="width90" cellspacing="1">


<!-- Title -->
<tr>
	<td class="form-title">
		<input type="hidden" name="m_id" value="<?php echo $f_master_bug_id ?>" />
		<input type="hidden" name="project_id" value="<?php echo $t_project_id ?>" />
		<input type="hidden" name="handler_id" value="0" />
		<?php echo lang_get( 'enter_report_details_title' ) ?>
	</td>
	<td class="right">
		<?php
			if ( BOTH == config_get( 'show_report' ) ) {
				print_bracket_link( 'bug_report_advanced_page.php' .
					( $f_master_bug_id > 0 ? '?m_id=' . $f_master_bug_id : '' ), lang_get( 'advanced_report_link' ) );
			}
		?>
	</td>
</tr>

<?php event_signal( 'EVENT_REPORT_BUG_FORM_TOP', array( $t_project_id, false ) ); ?>

<!-- Category -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category" width="30%">
		<?php echo config_get( 'allow_no_category' ) ? '' : '<span class="required">*</span>', lang_get( 'category' ) ?> <?php print_documentation_link( 'category' ) ?>
	</td>
	<td width="70%">
		<?php if ( $t_changed_project ) {
			echo "[" . project_get_field( $t_bug->project_id, 'name' ) . "] ";
		} ?>
		<select <?php echo helper_get_tab_index() ?> name="category_id">
			<?php 
				print_category_option_list( $f_category_id ); 
			?>
		</select>
	</td>
</tr>


<!-- Reproducibility -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'reproducibility' ) ?> <?php print_documentation_link( 'reproducibility' ) ?>
	</td>
	<td>
		<select <?php echo helper_get_tab_index() ?> name="reproducibility">
			<?php print_enum_string_option_list( 'reproducibility', $f_reproducibility ) ?>
		</select>
	</td>
</tr>



<!-- Severity -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'severity' ) ?> <?php print_documentation_link( 'severity' ) ?>
	</td>
	<td>
		<select <?php echo helper_get_tab_index() ?> name="severity">
			<?php print_enum_string_option_list( 'severity', $f_severity ) ?>
		</select>
	</td>
</tr>


<!-- Priority (if permissions allow) -->
<?php if ( access_has_project_level( config_get( 'handle_bug_threshold' ) ) ) { ?>
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'priority' ) ?> <?php print_documentation_link( 'priority' ) ?>
	</td>
	<td>
		<select <?php echo helper_get_tab_index() ?> name="priority">
			<?php print_enum_string_option_list( 'priority', $f_priority ) ?>
		</select>
	</td>
</tr>
<?php } ?>


<!-- spacer -->
<tr class="spacer">
	<td colspan="2"></td>
</tr>

<?php
	$t_show_version = ( ON == config_get( 'show_product_version' ) )
			|| ( ( AUTO == config_get( 'show_product_version' ) )
						&& ( count( version_get_all_rows( $t_project_id ) ) > 0 ) );
	if ( $t_show_version ) {
		$t_product_version_released_mask = VERSION_RELEASED;

		if (access_has_project_level( config_get( 'report_issues_for_unreleased_versions_threshold' ) ) ) {
			$t_product_version_released_mask = VERSION_ALL;
		}
?>
<!-- Product Version -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'product_version' ) ?>
	</td>
	<td>
		<select <?php echo helper_get_tab_index() ?> name="product_version">
                       <?php print_version_option_list( $f_product_version, $t_project_id, $t_product_version_released_mask ); ?>
		</select>
	</td>
</tr>
<?php
	}
?>

<?php event_signal( 'EVENT_REPORT_BUG_FORM', array( $t_project_id, false ) ); ?>

<!-- spacer -->
<tr class="spacer">
	<td colspan="2"></td>
</tr>


<!-- Summary -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<span class="required">*</span><?php echo lang_get( 'summary' ) ?> <?php print_documentation_link( 'summary' ) ?>
	</td>
	<td>
		<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo $f_summary ?>" />
	</td>
</tr>


<!-- Description -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<span class="required">*</span><?php echo lang_get( 'description' ) ?> <?php print_documentation_link( 'description' ) ?>
	</td>
	<td>
		<textarea <?php echo helper_get_tab_index() ?> name="description" cols="80" rows="10"><?php echo $f_description ?></textarea>
	</td>
</tr>


<!-- Additional information -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'additional_information' ) ?> <?php print_documentation_link( 'additional_information' ) ?>
	</td>
	<td>
		<textarea <?php echo helper_get_tab_index() ?> name="additional_info" cols="80" rows="10"><?php echo $f_additional_info ?></textarea>
	</td>
</tr>


<!-- spacer -->
<tr class="spacer">
	<td colspan="2"></td>
</tr>


<!-- Custom Fields -->
<?php
	$t_custom_fields_found = false;
	$t_related_custom_field_ids = custom_field_get_linked_ids( $t_project_id );
	foreach( $t_related_custom_field_ids as $t_id ) {
		$t_def = custom_field_get_definition( $t_id );
		if( ( ( $t_def['display_report'] && !$t_def['advanced'] ) || $t_def['require_report']) && custom_field_has_write_access_to_project( $t_id, $t_project_id ) ) {
			$t_custom_fields_found = true;
?>
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php if( $t_def['require_report'] ) { ?>
			<span class="required">*</span>
		<?php } ?>
		<?php echo string_display( lang_get_defaulted( $t_def['name'] ) ) ?>
	</td>
	<td>
		<?php print_custom_field_input( $t_def, ( $f_master_bug_id === 0 ) ? null : $f_master_bug_id ) ?>
	</td>
</tr>
<?php
		} # if (!$t_def['advanced']) && has write access
	} # foreach( $t_related_custom_field_ids as $t_id )
?>


<?php if ( $t_custom_fields_found ) { ?>
<!-- spacer -->
<tr class="spacer">
	<td colspan="2"></td>
</tr>
<?php } ?>


<!-- File Upload (if enabled) -->
<?php if ( file_allow_bug_upload() ) {
	$t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
?>
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'upload_file' ) ?>
		<?php echo '<span class="small">(' . lang_get( 'max_file_size' ) . ': ' . number_format( $t_max_file_size/1000 ) . 'k)</span>'?>
	</td>
	<td>
		<input type="hidden" name="max_file_size" value="<?php echo $t_max_file_size ?>" />
		<input <?php echo helper_get_tab_index() ?> name="file" type="file" size="60" />
	</td>
</tr>
<?php } ?>


<!-- View Status -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'view_status' ) ?>
	</td>
	<td>
<?php
	if ( access_has_project_level( config_get( 'set_view_status_threshold' ) ) ) {
?>
		<label><input <?php echo helper_get_tab_index() ?> type="radio" name="view_state" value="<?php echo VS_PUBLIC ?>" <?php check_checked( $f_view_state, VS_PUBLIC ) ?> /> <?php echo lang_get( 'public' ) ?></label>
		<label><input <?php echo helper_get_tab_index() ?> type="radio" name="view_state" value="<?php echo VS_PRIVATE ?>" <?php check_checked( $f_view_state, VS_PRIVATE ) ?> /> <?php echo lang_get( 'private' ) ?></label>
<?php
	} else {
		echo get_enum_element( 'project_view_state', $f_view_state );
	}
?>
	</td>
</tr>

<!-- Relationship (in case of cloned bug creation...) -->
<?php
	if( $f_master_bug_id > 0 ) {
?>
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'relationship_with_parent' ) ?>
	</td>
	<td>
		<?php relationship_list_box( /* none */ -2, "rel_type", false, true ) ?>
		<?php echo '<b>' . lang_get( 'bug' ) . ' ' . bug_format_id( $f_master_bug_id ) . '</b>' ?>
	</td>
</tr>
<?php
	}
?>

<!-- Report Stay (report more bugs) -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'report_stay' ) ?> <?php print_documentation_link( 'report_stay' ) ?>
	</td>
	<td>
		<label><input <?php echo helper_get_tab_index() ?> type="checkbox" id="report_stay" name="report_stay" <?php check_checked( $f_report_stay ) ?> /> <?php echo lang_get( 'check_report_more_bugs' ) ?></label>
	</td>
</tr>



<!-- Submit Button -->
<tr>
	<td class="left">
		<span class="required"> * <?php echo lang_get( 'required' ) ?></span>
	</td>
	<td class="center">
		<input <?php echo helper_get_tab_index() ?> type="submit" class="button" value="<?php echo lang_get( 'submit_report_button' ) ?>" />
	</td>
</tr>


</table>
</form>
</div>

<!-- Autofocus JS -->
<?php if ( ON == config_get( 'use_javascript' ) ) { ?>
<script type="text/javascript" language="JavaScript">
<!--
	window.document.report_bug_form.category_id.focus();
-->
</script>
<?php } ?>

<?php html_page_bottom1( __FILE__ ) ?>
bug_report_page.txt (13,652 bytes)   
Reminder112.zip (15,066 bytes)
Reminder120.zip (15,428 bytes)
strings_french.txt (2,069 bytes)   
<?php
$s_reminder_plugin_title 			= "Mantis Envoi d'email de rappel" ;
$s_reminder_config 					= "Configuration" ;
$s_reminder_bug_status				= "Sélectionner uniquement les bogues dans le statut" ;
$s_reminder_mail_subject			= "Corps du message de Rappel" ;
$s_reminder_sender					= "Adresse email de l'expéditeur" ;
$s_reminder_days_treshold			= "Nombre de jours (heures) avant la date d'échéance";
$s_reminder_update_config			= 'Mettre à jour la définition';
$s_reminder_store_as_note			= "Stocker le rappel en tant que note (uniquement pour le gestionnaire)";
$s_reminder_store_enabled 			= "On";
$s_reminder_store_disabled 			= "Off";
$s_reminder_ignore_unset			= "Ignorer les bogues sans date d'échéance"; 
$s_reminder_ignore_past				= "Ignorer les bogues avec date d'échéance dans le passé"; 
$s_reminder_group_issues			= "Grouper les bogues (Seulement si Off ci-dessous)";
$s_reminder_group_project			= "Séparer les mails groupés par projet (Seulement si Off ci-dessus)";
$s_reminder_manager_overview		= "Générer le mail du manager par projet";
$s_reminder_handler					= "Générer le mail du gestionnaire";
$s_reminder_group_subject			= "Sujet du mail groupé";
$s_reminder_group_body1				= "Début du corps du mail groupé";
$s_reminder_group_body2				= "Fin du corps du mail groupé";
$s_reminder_project_name			= "Sélectionner le projet";
$s_reminder_download				= "Télécharger les bogues échus";
$s_reminder_feedback_project_name	= "Sélectionner le projet pour lequel recevoir les emails de commentaire";
$s_reminder_feedback_status			= "Sélectionner uniquement les bogues dans le statut" ;
$s_reminder_login					= "Exécuter le script planifié avec le compte de : " ;
$s_reminder_subject					= "Sujet de l'email pour le script Commentaire" ;
$s_reminder_finished				= "Texte affiché à la fin lors de l'exécution dans le navigateur" ;
$s_reminder_plugin_desc 			= "Envoie des emails pour prévenir de l'approche de dates d'échéances" ;
$s_reminder_hours					= "Utiliser des heurs à la place des jours";
strings_french.txt (2,069 bytes)   
Reminder121.zip (16,722 bytes)
Reminder122.zip (19,588 bytes)
strings_chinese_traditional.txt (1,874 bytes)   
<?php
$s_reminder_plugin_title 			= "Mantis寄發提醒郵件" ;
$s_reminder_config 					= "設定" ;
$s_reminder_bug_status				= "只在此問題狀態時" ;
$s_reminder_mail_subject			= "通知內容" ;
$s_reminder_sender					= "郵件寄件人" ;
$s_reminder_days_treshold			= "到期天數(時數前)";
$s_reminder_update_config			= '更新定義';
$s_reminder_store_as_note			= "將提醒儲存成記事(只有負責人handler可以生效)";
$s_reminder_store_enabled 			= "開啟";
$s_reminder_store_disabled 			= "關閉";
$s_reminder_ignore_unset			= "忽略沒有設置到期日的問題";
$s_reminder_ignore_past				= "忽略已到期的問題";
$s_reminder_group_issues			= "群組問題 (只有在下列選項關閉時)";
$s_reminder_group_project			= "依專案不同分開群組問題 (只有在上述選項關閉時)";
$s_reminder_manager_overview		= "依專案產生管理者信件";
$s_reminder_handler					= "產生負責人信件";
$s_reminder_group_subject			= "群組信件的標題";
$s_reminder_group_body1				= "群組信件的內容開頭";
$s_reminder_group_body2				= "群組信件的內容結尾";
$s_reminder_project_name			= "選擇專案";
$s_reminder_download				= "下載到期問題";
$s_reminder_feedback_email			= "Mantis寄發待更新信件" ;
$s_reminder_feedback_project_name	= "選擇專案收取待更新信件";
$s_reminder_feedback_status			= "只選擇此狀態的問題" ;
$s_reminder_login					= "以這個帳號來執行排定行程的描述檔" ;
$s_reminder_subject					= "回覆描述檔產生信件的標題" ;
$s_reminder_finished				= "以瀏覽器執行,結束時要顯示的文字" ;
$s_reminder_plugin_desc 			= "以信件與CSV檔警告即將到期的問題" ;
$s_reminder_hours					= "以時數來取代天數";
$s_reminder_export_settings			= "匯出設定";
$s_reminder_export_colsep			= "Csv分割符號";

Relationships

has duplicate 0010351 closedjreese mantisbt Problem using Reminder plugin? 
has duplicate 0011807 closedjreese mantisbt Email Notification to inform the Due Date of a task or issue 
related to 0010211 acknowledged mantisbt SLA 

Activities

Kirill

Kirill

2009-02-23 14:47

reporter   ~0020924

Very nice

jreese

jreese

2009-02-23 14:57

reporter   ~0020925

Perhaps you might consider submitting a Git repository with the plugin to http://git.mantisforge.org ?

prabhurangan

prabhurangan

2009-03-02 01:49

reporter   ~0020968

How to install this plugin or use this plugin.

Please let me know. Urgent

cas

cas

2009-03-02 04:51

developer   ~0020970

Last edited: 2009-03-16 05:21

log on as admin
goto manage
goto manage plugins
click on install.
The readme contains info on how to have this generate output on a regualr basis

prabhurangan

prabhurangan

2009-03-02 05:08

reporter   ~0020972

@Cas

Thank you for your reply. It is working for me now. However i need to send a reminder by gathering all the assigned issues to me and it should look for deadline and send it as a single email daily...

Now Im receiving email for each individual project.

Also if im a manager i would be managing different projects. In that case i would need a complete reminder which has info of issues assigned to each developer, under my view.

Ex:
If Im a manager: and Mr.XX, Mr.YY, Mr.ZZ is my team members, i would like to send reminder to each team members of their assigned issues and to the manager it should send reminder of all the team members composed to single email.

Hope you would follow me.

Im posting this; so as to get help from you or to get idea from you.

Regards,
Prabhu.

prabhurangan

prabhurangan

2009-03-02 05:33

reporter   ~0020975

@Cas

For each issue im receiving reminder emails; if it is a single email containing all the issues which has its due shortly it would be fine.

cas

cas

2009-03-02 20:00

developer   ~0020980

Who is the manager for each project, those that have that role within the project?
Correct me if I am wrong, in addition you suggest grouping of reminders in 4 levels:
Reminder per issue/handler
Reminder per handler (containing all concerning issues)
Reminder per handler/project (containing all concerning issues of each project)
Reminder per manager/project (containing all concerning issues of managed project)

prabhurangan

prabhurangan

2009-03-02 23:01

reporter   ~0020983

@cas

Yes cas; you are right. The one who has role within the project is the manager. Also I would suggest 2nd and 4th point.

  1. Reminder per handler(containing all concerning issues from all projects)
  2. Reminder per manager(for which it contains the issues of all projects he handles as a manager, but the issues has to be customized according to the handlers, under the manager)
cas

cas

2009-03-10 09:52

developer   ~0021023

Not sure what you mean under 4 "has to be customized", can you explain more?
Most other things will be come available shortly.

cas

cas

2009-03-16 05:15

developer   ~0021047

Here is version 1.0 with some more options including a bonus program to create a spreadsheet with all issues nearing Due date.
Please provide feedback.

prabhurangan

prabhurangan

2009-03-16 05:45

reporter   ~0021048

@cas

Thanks for your contribution. Well in the above said point 4, 'has to be customized' in the sense, if the Reminder is sent Per manager:
If say Mr.XX is manger, Mr.YY and Mr.ZZ are developers, lets say Quality Assurance is the project, Mr.XX is the manager of this project QA, and Mr.YY and Mr.ZZ are developers in that, Reminer has to be sent in the way per handler to the manager,
Reminder sent to manager should be:
Project wise and per handler wise.

If Mr.XX handles one or more projects and the handlers also differs for each project.

Reminder:

project: Quality Assurance

Handler: Mr.YY

  1. Reminder for issue id= 7567
  2. Reminder for issue id = 5678
    Handler: Mr.ZZ
  3. Reminder for issue id=8567
  4. Reminder for issue id=2345

Hope you would understand...

Regards,
Prabhu

prabhurangan

prabhurangan

2009-03-16 05:47

reporter   ~0021049

@cas

Do you have any idea of other plugins available with mantis 1.2.0a3 version. Like hierarchy plugin, AutoAssign plugin, Search plugin etc...

Please keep me intimated..

Regards,
Prabhu

prabhurangan

prabhurangan

2009-03-16 05:49

reporter   ~0021050

@cas

One more issue with Reminder091 plugin:

'Ignore issues with Due date not set ' = ON or OFF,

If i set 'ON' for this option im not receiving any reminder emails, but i receive reminder only if it is set to OFF.

Please can you explain on this.

Kirill

Kirill

2009-03-16 08:53

reporter   ~0021056

@cas Can you upload to git? If you has trouble - connect to me JID:krak@jabber.ru or forum:Kirill

cas

cas

2009-03-16 13:45

developer   ~0021061

Last edited: 2009-03-16 14:33

If the due_date is not set, the year of the due date will have a value of 1970 (default value).
Do you notice similar behavior with the latest version?

The manager overview does not have the split as mentioned but this may become available later.

prabhurangan

prabhurangan

2009-03-24 04:52

reporter   ~0021173

@cas

I am facing some issues, while the reminder is send for due_date. If suppose say, there are 5 users and the reminder is scheduled. It will email them the due_date for their assigned task. And if any of the users are deleted or disabled, the reminder plugin still checks for those users who are removed or deleted from the list.

Short note:

Reminder sending for due_date should not be checking for users those who are disabled or deleted. If i do so, it is throwing error as 'user6' not found. Because if say 'RAMU' is the user with id= 6 and if i delete this user, the tasks which he was kept assigned changes to Assigned To = 'user6'.

Is this a issues? Cas;

cas

cas

2009-03-24 05:24

developer   ~0021175

It is a bit strange to have still open issues assigned to a deleted user.
However will buid in a check to avoid error message.

prabhurangan

prabhurangan

2009-03-24 05:32

reporter   ~0021178

@cas

I just tried to delete a user and tried to send reminder, and by the way i tested i found this. However it would be nice, if we skip those bugs, for which the user has been deleted. In some case the reporter might be removed from the 'mantis_user_table', in such case also we would face some issues.

Yes cas, also the error message says, 'Application with no_users' not sure exactly. However if we make it as a cron job or scheduled job, we would not know what errors we face, but we would not be getting any notifications for deadline.

prabhurangan

prabhurangan

2009-04-14 06:13

reporter   ~0021510

@cas

Below is the reminder email format I am receiving:

     On 2009-04-14 15:37, prabhu  sent you this reminder about: 

     http://localhost/mylo/view.php?id=6357 

     Following issue will be Due shortly

Question 1:
In this i am not sure, how my name gets included in the first line . Also if we set a cron job to send reminder email, what would be the case. Whose name will be set there.

Question 2:
In the last line, we have 'Following issue will be Due shortly' in that it would be nice to display the 'Due Date' for which the bug is set for Due.
Like 'Following issue will be Due on 2009-04-16.'

prabhurangan

prabhurangan

2009-04-14 06:33

reporter   ~0021511

Last edited: 2009-04-14 06:45

@cas

Also i tried to execute the command
"http://mantis.homepage.com/plugin.php?page=Reminder/bug_reminder_mail.php&quot; by setting it as a cron in Linux FC10 machine, it is not executing; instead it throws a error as, 'No such file or directory'.

Please let me know your thoughts in this.

prabhurangan

prabhurangan

2009-04-24 00:13

reporter   ~0021652

@cas

Reply to your note on http://www.mantisbt.org/bugs/view.php?id=4220#c21632; However cas, i could not set this as a cron job in linux; it is not executing, but if i execute the reminder_mail.php manually, it is working fine.

Please let me know mre in details about authorisation Issue that you have mentioned in your note.

Regards,
Prabhu.

cas

cas

2009-04-24 03:47

developer   ~0021656

Last edited: 2009-04-28 02:16

if you check the php script, you can see that there is no reference to the mantis authorization scheme. So to me it seems that the root user has no access or something like that. As indicated earlier, I have no linux testbox so I cannot do much for you.

prabhurangan

prabhurangan

2009-04-28 00:22

reporter   ~0021710

@cas

Is there any other solution to fix this right now? Please let me know; if you can provide me some good solution it might be helpful to me................

I am still waiting for some fix to this issue

cas

cas

2009-04-28 02:19

developer   ~0021711

Can you execute it from within a browser?

prabhurangan

prabhurangan

2009-04-28 04:39

reporter   ~0021712

Last edited: 2009-04-29 00:15

Yes i could, execute it from within a browser............ in LINUX machine

prabhurangan

prabhurangan

2009-04-29 04:39

reporter   ~0021717

@cas

I could execute it from within a browser....from LINUX machine

cas

cas

2009-04-29 08:18

developer   ~0021724

So it works as expected. Really cannot help you on the cron job, as stated before I do not have this type of box.

prabhurangan

prabhurangan

2009-04-29 08:22

reporter   ~0021725

@cas

It works through browser; however making it to execute automatically as a cron job in LINUX is not possible.

prabhurangan

prabhurangan

2009-04-29 08:24

reporter   ~0021726

@cas

I think there is some issue in the syntax we use to set as cron job.

Can you please check and let me know if there is any issue with syntax.... You can consult with other users who use this Reminder plugin

cas

cas

2009-04-30 04:41

developer   ~0021730

I don't use the cron job, syntax I got from someone where it was working.

prabhurangan

prabhurangan

2009-05-28 00:45

reporter   ~0021947

@cas and all

Finally we have fixed this issue. Deadline Reminder has been made to work successfully in LINUX machine, using 'lynx' browser. The issue we faced is, it requires for User authentication, so whenever i ran the deadline reminder, i got the login page and so we tried to login using 'lynx' browser and save the session in cookies and then execute the reminder command.

Now the deadline reminder will be working fine. The reason for this issue is, in LINUX machine, we used a text based browser named 'LYNX' and while executing the deadline reminder command, it will be prompting for 'username' and 'password' to login, only then it will execute the command.

So we did it by logging in and saved the session in COOKIES, which is saved to a file and placed in '/root/REMINDERCOOKIE' in host server.

Steps handled to fix this Authentication:

1.) Install 'lynx' which is a text based browser.
2.) configure '/etc/lynx.cfg' in which all the settings has been configured.
Attributes to be configured:

   *)ACCEPT_ALL_COOKIES=TRUE [NOTE: it will be set to 'FALSE' by default]
   *)PERSISTANCE_COOKIE=TRUE[NOTE: it will be set to 'FALSE' by default]
   *)FORCE_SSL_PROMPT=YES [NOTE: it will be set to 'PROMPT' by default]
   *)FORCE_COOKIE_PROMPT=YES[NOTE: it will be set to 'PROMOPT' by default]

3.) Then we have to execute the command 'lynx https://hostname/mantis [^]
4.) It will navigate to 'login_page.php'
5.) we have to login with a valid 'username' and 'password'
6.) This session will be saved in the COOKIE file that we have setup in configuration file '/etc/lynx.cfg'
7.) Then we shall test it by 'quit' the current session
8.) And again we should try logging using the syntax 'lynax https://hostname/mantis' [^]
9) This time it should not navigate to 'login_page.php' as the login details have been saved in COOKIES
10.) Finally the command to email deadline Reminder can be executed by
'lynx --dump -cookie_file=/root/REMINDERCOOKIE https://mantis/path/plugin.php?page=Reminder/bug_reminder_mail.php' [^]

[Hope everyone is clear with this solution]

Regards,
Prabhu.

prabhurangan

prabhurangan

2009-05-28 00:47

reporter   ~0021948

@cas

I face some major issue with this reminder. The due task is emailed twice for all the individual task, but with '1' minute difference.

If i receive a reminder for particular task by 9.33AM, for the same task I receive the reminder by 9.34AM.

Please let me know the fix to this.

Regards,
Prabhu

harpreet_singh

harpreet_singh

2009-05-28 13:26

reporter   ~0021960

@cas

Log on as administrator

goto manage (OK)
goto manage plugins ( I am not able to see this field). I am on Ver 1.1.7.

<<[ Manage Users ] [ Manage Projects ] [ Manage Custom Fields ] [ Manage Global Profiles ] [ Manage Configuration ]

[ Configuration Report ] [ Permissions Report ] [ Workflow Thresholds ] [ Workflow Transitions ] [ E-mail Notifications ]

Please advise.

Harpreet.

Kirill

Kirill

2009-05-31 15:08

reporter   ~0022010

@harpreet_singh, it's only for 1.2.x version.

harpreet_singh

harpreet_singh

2009-05-31 21:47

reporter   ~0022018

Dear Kirill,

Thanks for the update.

Have a nice day.

Harpreet..

tmatijas

tmatijas

2009-10-11 22:18

reporter   ~0023131

any way to get this wo work in version 1.1.8? There is no plugin manager and I am having a hard time porting it.

Kirill

Kirill

2009-10-16 13:37

reporter   ~0023219

It's only for 1.2.x plugin system.
For 1.x.x you can use http://deboutv.free.fr/mantis/

Naeem

Naeem

2010-04-16 05:01

reporter   ~0025138

Hi All,

I have installed this plugin in my mantis have installed successfully but how to run bug_reminder_mail.php file as my mantis in installed on xampp pls let me know if you have any idea?

TomR

TomR

2010-04-16 07:53

reporter   ~0025143

Last edited: 2010-04-16 08:17

Hi all,

I use Reminder10

I had to change the source of pages/bug_reminder_mail.php

Removed line 171 ( there was one } too many ).

However when using the plugin I got some errors.

I tried directly from browser and in linux with lynx.
Also tried from command line with:

/usr/local/bin/php /home/cursad/domains/cursad.nl/public_html/cts/plugin.php?page=Reminder/bug_reminder_mail.php

Could not open input file: /home/cursad/domains/cursad.nl/public_html/cts/plugin.php?page=Reminder/bug_reminder_mail.php

For error see attached screenshot

cas

cas

2010-04-16 12:39

developer   ~0025148

Last edited: 2010-04-16 13:01

OK, I updated the plugin since I did find some errors.
I am now stuck abroad (cannot get a plane home) but upon my return I will upload the latest & greatest. (this may take at least another 4-5 days depending on the freaking ash clouds)

casperme

casperme

2010-04-20 20:48

reporter   ~0025173

I have the same problem with TomR, i remove one extra closing brace ("}") at line 171. But when i try to use this ("http://mantis.homepage.com/plugin.php?page=Reminder/bug_reminder_mail.php&quot;) on my browser, I got Application Error #11. Is there something wrong on my configuration or what? Could you provide a way or a tip on how to fix this? Thank you in advance.

casperme

casperme

2010-04-21 12:18

reporter   ~0025194

i have notice that when i change the Value of "Ignore issues with Due date not set" to "ON", and i click on "Update definition", then run "http://mantis.homepage.com/plugin.php?page=Reminder/bug_reminder_mail.php&quot; again, I could generate the same error and the browser would be just a plain white color without any text on it.
What could happening this? still no email notifying my that the task is almost due...

cas

cas

2010-04-22 11:09

developer   ~0025198

OK, back in town and have uploaded version 1.03
Hopefully killed all bugs.
In addition added functionality for sending out an email for those issues with Status feedback in order to urge reporters to come up with a response.

TomR

TomR

2010-04-22 11:26

reporter   ~0025199

Cas,

hope you had a nice flight back ;-]

I installaed 1.0.3, but I am still not able to use the plugin throu the browser ( or from command line ).

Error:

APPLICATION WARNING #user_get_field() for NO_USER:
APPLICATION WARNING #user_get_field() for NO_USER:
APPLICATION WARNING #user_get_field() for NO_USER:
APPLICATION WARNING #user_get_field() for NO_USER:

cas

cas

2010-04-22 12:14

developer   ~0025203

OK, disable the ones without duedate, this would do the trick.
Will dive in that one tomorrow.

casperme

casperme

2010-04-22 21:46

reporter   ~0025210

Last edited: 2010-04-22 21:52

Hello, thanks for the quick response.

I already install the new update, but got the same problem with TomR again..

It says:

APPLICATION WARNING #user_get_field() for NO_USER:

APPLICATION WARNING #user_get_field() for NO_USER:

But when i turn Off the "Generate manager mail by project", i would not get an error, but the screen will not display anything, just plain white.

What do you mean to disable the ones without duedate?

cas

cas

2010-04-23 02:44

developer   ~0025216

The problem arises when no handler was assigned to an issue.
I took care of that in version 1.04
Now in principle the plugin looks for issues due today + defined number of days, for those an email will be send..
If you select take Due_dates in the past into account, it will react on all issues that will be /have been due today + defined number of days, they all get an email.
Hope this helps in further testing.

casperme

casperme

2010-04-23 03:33

reporter   ~0025220

Last edited: 2010-04-23 04:38

Thanks cas,

I'm already receiving some mails using your plugins. Thank you very much, i need to further test this one, because when i click on the link for the issue in the email, i am having an application error #203 "A number was expected for id."

This is the email i got:

Please review the following
issues\<br>'http://joomla.cisium.com/view.php?id=3<br>http://joomla.cisium.com/view.php?id=5<br>http://joomla.cisium.com/view.php?id=1<br>'<br>Please
do not reply to this message

you will notice that on the link it has an HTML code ("<br>"), don't know if it is because of my configuration or what.

But anyway thank you for this plugin, i really like this one. :)

cas

cas

2010-04-23 04:32

developer   ~0025221

Last edited: 2010-04-23 04:51

Does the original email perhaps show the html BR at the end of the line?
Think that is happening but would like confirmation.
If so, i need to adjust the build of the email-body which is not a big thing.

cas

cas

2010-04-23 04:42

developer   ~0025222

in version 1.05 I have adjusted the body, can you check if links are ok now?

casperme

casperme

2010-04-23 05:00

reporter   ~0025225

That perfect, its fix now. Got the email and the format is good... Got it working nicely now... Thank very much.. :-)

TomR

TomR

2010-04-23 09:23

reporter   ~0025230

Cas,

I am sorry. Installed 1.0.5 but still get errors:

APPLICATION WARNING #user_get_field() for NO_USER:

APPLICATION WARNING #user_get_field() for NO_USER:

APPLICATION WARNING #user_get_field() for NO_USER:

APPLICATION WARNING #user_get_field() for NO_USER:

What is causing this?

@casperme: how did you solve that?

TomR

TomR

2010-04-23 09:28

reporter   ~0025231

Last edited: 2010-04-23 09:30

I also notice, that when I change to a specific project, and the try to update the configuration, it always revert to All Projects.

Tried with different browsers. ;-(

TomR

TomR

2010-04-23 09:43

reporter   ~0025232

I figured out that config.php is not correct. Missing lines and an error/typo.

However when I corrected the source it is still not working.

cas

cas

2010-04-23 15:48

developer   ~0025237

@TomR
This message "user_get_field() for NO_USER" was raised for issues were no handler was specified. These are now excludec.
What are your settings in the config ?

I willl check the project settings, must admit that I did not test thgis specifically.

SL-Gundam

SL-Gundam

2010-04-23 18:26

reporter   ~0025238

Last edited: 2010-04-23 18:28

@cas. This will not work


or via command line interface
/1440 * /usr/local/bin/php /path/to/mantis/plugin.php?page=Reminder/bug_reminder_mail.php

and

g:
cd \inetpub\wwwroot\mantis
php.exe plugin.php?page=Reminder/bug_reminder_mail.php

the gpc_get function calls used by mantis only check for $_get, $_post en $_cookie so page is unavailable, since in the above it would be in argc and argv variables

Also you need to call the php files and after that at least one space before specifying extra arguments

It is the main reason i created scripts/bug_report_mail.php for EmailReporting.

TomR

TomR

2010-04-24 04:12

reporter   ~0025241

Cas,

I manually update the project settings in the mantis_config_table.

I Set everything on On. I checked that every issue with a plandate has an Handler.
I set number of days high enough, but when i browse to then bug_reminder_mail.php page it only gives me an blank browser screen and no mails are sent.

cas

cas

2010-04-24 05:57

developer   ~0025243

@tomr,
did you configure Mantisa to mail immediately or scheduled?
In the latter case, all mails are available in the table.

TomR

TomR

2010-04-24 06:51

reporter   ~0025244

@Cas,

stupid, stupid, stupid.

You are quit right. Email is sent as a cronjob ( only during working hours ).

However: I noticed that the field email all contains @null@, however somehow it does not pickup the actual email of the handler.

The body does only show some tekxt, but not the issues ( or issue nummers ).

casperme

casperme

2010-04-25 22:19

reporter   ~0025255

@prabhurangan or @cas :

Is there other way to store the session cookie, other than modifying the "lynx.cfg". It's because my web host doesn't allow me to change that file as it is shared with other user on that server. Do you have any idea how i could do it? as my cron job will not work properly without following prabhurangan instruction above (0021947).

Thanks.

SL-Gundam

SL-Gundam

2010-04-26 02:36

reporter   ~0025257

That could also be fixed if cas would use the auth_attempt_script_login function to log the reminder script into a particular account.

Off course somewhere it needs to be selected which account needs to be used

cas

cas

2010-04-26 06:04

developer   ~0025263

Last edited: 2010-04-26 06:26

Issue with selecting project solved in version 1.06
Next will deal with comments from SL-Gundam about the scripts to be scheduled.

cas

cas

2010-04-26 07:45

developer   ~0025266

Handled scheduling (see readme for new way of dealing) and authorizations in version 1.07

TomR

TomR

2010-04-26 08:54

reporter   ~0025268

Last edited: 2010-04-26 08:55

Cas,

I think there is a type in scripts/bug_reminder_mail.php

require_once( '/../../../core.php' );

should be

require_once( '../../../core.php' );

At least for me, otherwise it can not find the correct path due to OPENBASE_DIR restrictions.

Unfortunately I will not get any emails form the plugin ( in the email table or direct ), while I am sure it should sent something ( I have some plan-dates, the status is correct ).

Any idea how to debug why it dos not sent ( select any issue ) any emails?

( By the the way, selecting a project is working fine now ( 0010153:0025263 ).

cas

cas

2010-04-26 16:21

reporter   ~0025276

TomR,
suppose your site is not available over the net?
What are your settings in the config page?

casperme

casperme

2010-04-26 22:09

reporter   ~0025278

Last edited: 2010-04-26 22:23

Cas,

the same with me, for scripts/bug_reminder_mail.php and scripts/bug_feedback_mail.php,

when using this:
require_once('/../../../core.php'); # it will return Fatal error;

but when using this:
require_once('../../../core.php'); # is okay

its working fine for me now, both scripts/bug_reminder_mail.php and scripts/bug_feedback_mail.php is working fine... Thank you very much for this..

cas

cas

2010-04-27 03:31

reporter   ~0025282

Have adjusted the source code. Will be in version 1.08
This will be released upon receiving further comments from TomR (and fixing of those).

TomR

TomR

2010-04-27 05:05

reporter   ~0025285

Cas,

my settings are that everything is on On.
Number of days 60
Status: Assign
Selected 1 project
Run scheduled script account is beheer ( admin account ).

If you want, I can setup a test enviroment and give you an temp. account on that.
However that wil be tommorow.

cas

cas

2010-04-27 08:19

reporter   ~0025290

Last edited: 2010-04-27 08:56

Uploaded version 1.08. Did find some issues based upon TomR comments and hopefully took care of them.

In the script directory you will also find a script called bug_reminder_mail_test.php
This script which you should call from within the browser (once logged on) will provide useful feedback if things are not working as expected. No updates are done nor emails sent by this script.
In case of a blank screen, all is processed normally.

@TomR
In case of continuing problems, a test environment may be needed.

srinvas233

srinvas233

2010-04-27 08:32

reporter   ~0025291

Cas , i have installed your plugin and when i am accessing the url(http://localhost/mantisbt/plugin.php?page=Reminder/bug_reminder_mail.php) i am getting the error below,
.
.
.
.
"
APPLICATION ERROR #2502

Plugin page not found.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
"

cas

cas

2010-04-27 08:48

reporter   ~0025292

That makes sense since I had to move the scripts in order to accomodate the scheduling options.
Also according the readme you should use:
http://your_mantis_installation/plugins/Reminder/scripts/bug_reminder_mail.php

srinvas233

srinvas233

2010-04-27 08:58

reporter   ~0025294

Last edited: 2010-04-27 08:59

that did the work thanks a lot..
However ,a successful message is better than blank screen.thanks

cas

cas

2010-04-27 09:07

reporter   ~0025295

Yes, it can be run online but that script actually is meant to be used in batch mode hence no output.
If I could determine if the script is used online, I could generate a conditional message. But there i have no clue.

SL-Gundam

SL-Gundam

2010-04-27 09:30

reporter   ~0025296

You can do that with the following code (source EmailReporting plugin)

php_sapi_name() === 'cli'

cli = the command line client

http://www.php.net/php_sapi_name

cas

cas

2010-04-27 10:00

reporter   ~0025298

Thanks for the tip, will be available in next release (1.10)
Just waiting for additional feedback...........

TomR

TomR

2010-04-27 12:00

reporter   ~0025301

Last edited: 2010-04-27 12:15

I installed 1.08 and run plugins/Reminder/scripts/bug_reminder_mail_test/php

Result below

Query-handler being executed

SYSTEM WARNING: mysql_num_rows(): supplied argument is not a valid MySQL result resource
Query-handler had no results select id,handler_id,project_id from mantis_bug_table where status=50 and due_date<=1277568028 and handler_id<>0 and due_date>1 and project_id=t_rem_project order by handler_id order by project_id,handler_id
Query-Manager being executed

SYSTEM WARNING: mysql_num_rows(): supplied argument is not a valid MySQL result resource
Query-Manager had no results select id,handler_id,user_id from mantis_bug_table,mantis_project_user_list_table where status=50 and due_date<=1277568028 and due_date>1 and project_id=t_rem_project and mantis_bug_table.project_id=mantis_project_user_list_table.project_id and mantis_project_user_list_table.access_level=70 order by mantis_project_user_list_table.project_id,mantis_project_user_list_table.user_id

Seems to be some types in line 49 and 149: t_rem_project -> $t_rem_project

However when I fix the typos it still gives me an error:

Query-handler being executed

SYSTEM WARNING: mysql_num_rows(): supplied argument is not a valid MySQL result resource
Query-handler had no results select id,handler_id,project_id from mantis_bug_table where status=50 and due_date<=1277568488 and handler_id<>0 and due_date>1 and project_id=2 order by handler_id order by project_id,handler_id
Query-Manager being executed

SYSTEM WARNING: mysql_num_rows(): supplied argument is not a valid MySQL result resource
Query-Manager had no results select id,handler_id,user_id from mantis_bug_table,mantis_project_user_list_table where status=50 and due_date<=1277568488 and due_date>1 and project_id=2 and mantis_bug_table.project_id=mantis_project_user_list_table.project_id and mantis_project_user_list_table.access_level=70 order by mantis_project_user_list_table.project_id,mantis_project_user_list_table.user_id

TomR

TomR

2010-04-27 12:15

reporter   ~0025302

@Cas,

found out that the constructed queries are not totally correct:

The first query having a double order by ( should be one )
The second query having an ambiguous field [Err] 1052 - Column 'project_id' in where clause is ambiguous

When I run the queries manually ( corrected ) I got some results.

I hope you can use this to perfect your plugin ( Thnx anyway for all your work ). I guess I'm a better testen than developer ;-)

cas

cas

2010-04-27 12:17

reporter   ~0025303

Will replay & fix this tomorrow. In the mean time, try with all projects and see if that is working ok.

cas

cas

2010-04-27 12:35

reporter   ~0025304

The double order i need to automate. It says in config that you should not activate both groupings. looks you did just that.
As for the ambiguous field, again will review that and adjust.

Good that we also have better testers than developers. This way it will become a decent plugin.

TomR

TomR

2010-04-27 12:40

reporter   ~0025305

Last edited: 2010-04-27 12:40

@Cas,

also got errors on the implode function.

I tried to comment them out, but that resulted in having emails sent out multiple tomes ( and bugnotes with incomplete information ).

However I hope this info will help you further.

cas

cas

2010-04-28 02:38

reporter   ~0025314

Have fixed in version 1.09 (atleast think i did):

  • Double Order
  • Ambiguous field
  • Implode error
  • Typos when selecting project
  • Message Completed on screen when running in browser
rakekniven

rakekniven

2010-04-28 04:23

reporter   ~0025315

Just installed 1.09 and still get error when calling:
/usr/bin/php5 /srv/www/htdocs/mantis/plugin.php?page=Reminder/bug_reminder_mail.php

Could not open input file

Install and config went fine without trouble.

Any hints?

cas

cas

2010-04-28 05:19

reporter   ~0025316

please read:
http://www.mantisbt.org/bugs/view.php?id=10153#c25292

casperme

casperme

2010-04-28 05:40

reporter   ~0025317

@Cas

on version 1.09, when i receive an email informing about the due date of the issue, the link given in like this (http://mantis.homepage.com/plugins/Reminder/scripts/view.php?id=1) which when i click will display URL not found.

i guess the link should be like this; (http://mantis.homepage.com/view.php?id=1). Because that was the link produce when using the older version of this plugin. Which when i click will direct me to the Detail of the issue.

Could you give me a tip on how to modify this new version to produce the same link as the old version?

cas

cas

2010-04-28 06:13

reporter   ~0025320

Did this happen when using the scheduled version or via the browser?
Have a hard time reproducing this. In my test environment I do get the correct link (be it using the browser or commandline).
This link is derived from path setting in the config using standard function:
config_get( 'path' )
What are your settings in config?

rakekniven

rakekniven

2010-04-28 06:16

reporter   ~0025321

@Cas

Thanks for the hint.
Calling the full URL made it work.
Calling "
/usr/bin/php5 /srv/www/htdocs/mantis/plugin.php?page=Reminder/scripts/bug_reminder_mail.php" still fails with error "Could not open input file".

So I will use "wget -q URL -O /dev/null" in my crontab

rakekniven

rakekniven

2010-04-28 06:29

reporter   ~0025322

Last edited: 2010-04-28 06:34

Same behaviour here. Link in email points to wrong path.
I used browser to call up php file.

btw. are you interested in having a german translation?

cas

cas

2010-04-28 06:40

reporter   ~0025323

German transaltion would be perfect. I still have some text that needs to be made variable. Would like to have this done in 1.10.
Then full transaltion can be done.

The way to call the script has changed. Unfortunately I cannot change the text under Additional Information anymore.
Please follow the README.

As for the error, please adjust the test script with the following 2 lines, just after "$basenow = time(true);"
echo "Path setting retrieved : ".config_get('path');
echo "<br>";

Now run the script and review output.

casperme

casperme

2010-04-28 08:48

reporter   ~0025324

@Cas,

i already found the culprit, why the link i received in the email was changed. It was because i updated my mantis this morning to the new stable release, version 1.2.1.

Would you mind looking for this issue? Hope its not a big change.

rakekniven

rakekniven

2010-04-28 09:09

reporter   ~0025325

@cas

just tried it.

Output is:
Path setting retrieved : http://192.168.0.7/mantis/plugins/Reminder/scripts/

My mantis root is:
http://192.168.0.7/mantis

I run v1.2.1 as well.

cas

cas

2010-04-28 09:36

reporter   ~0025328

Can you please try the following fix:
Add statement in config_inc.php reading (Rakekniven)
$g_path = 'http://192.168.0.7/mantis/';
Anyway pointing to your mantis installation.

rakekniven

rakekniven

2010-04-28 10:02

reporter   ~0025329

Works!

Does that means you get the wrong path?

cas

cas

2010-04-28 11:16

reporter   ~0025331

Uploaded version 1.10. If using 1.2.1, do read the documentation.
All text elements are variable now (except for the test script).
Translations can be added.

rakekniven

rakekniven

2010-04-28 11:29

reporter   ~0025332

Thumbs up for this nice plugin

IMHO setting g_path in config_inc is not a nice way. Mantis normally works without absolut pathes. Is there no variable/whatever to get the mantis path?

Please add a changelog file to your docs.

Should I sent my translation to you? Friday it should be ready.

cas

cas

2010-04-28 14:45

reporter   ~0025337

Last edited: 2010-04-29 07:38

I could define it as a variable within the plugin but that is a similar excercise.
I have this statement also in my curent config_inc.php so do not directly see the issue.

As for the translation, please send to admin_at_nuy_dot_info
Changelog will be available as of next version.

rakekniven

rakekniven

2010-04-30 03:03

reporter   ~0025354

Translation is nearly ready. I have a few questions and hints.

Plugin description ist not translatable
String "Sends E-mail to warn for Coming Due Dates"

README.TXT > Installation
What do you mean with "double click"?

Configuration:
Values in fields are not translateble e.g. "Issues requiring your attention"

What means "handler"?

Maybe I found some typos.

Group issues (Only when below if off)";
Seperate grouped mail by project (Only when above if off)
Do you mean "is" instead of "if"

cas

cas

2010-05-06 04:55

reporter   ~0025416

Last edited: 2010-05-06 06:38

Typos have been corrected (you are right).
The handler is the one the issue has been assigned to.
Plugin description is now translatable (reminder_plugin_desc)
Adjusted the readme on double-click.
Field values will only be available once so choose your language there.
Will release 1.11 upon receiving your translation

SL-Gundam

SL-Gundam

2010-05-06 12:34

reporter   ~0025430

Hi Cas,

Could you possibly change all the direct mysql_query calls to mantis api calls. People using mysqli or mssql server or any other supported database will not be able to use your plugin (including me as i'm using mysqli)

SL-Gundam

cas

cas

2010-05-07 03:53

reporter   ~0025435

Version 1.11 with :

  • German translation
  • Mantis db api calls
  • Changelog
  • Minor bugfixes
rakekniven

rakekniven

2010-05-07 07:42

reporter   ~0025438

Hallo cas,
new release works fine.
Only thing is that I receive my reminder twice.
I setup a cronjob to run once every morning 6 am.
At the moment I have one issue with due time.
I receive two emails with same date and time.
Strange ...

Any ideas?

Cheers

cas

cas

2010-05-07 08:24

reporter   ~0025439

Mark,
Do you get the mail once as handler and once as manager or both for the same role?
Suggest you run the test script ( plugins/Reminder/scripts/bug_reminder_mail_test.php ) from the browser. It will use your settings and spit all output onto the screen. This way you can check the query itself and what it generates.

atrol

atrol

2010-05-25 06:24

developer   ~0025607

cas, are you aware that there exists also http://git.mantisforge.org/w/Reminder.git
Alexander Menk commented the first commit:
Version 1.01 upload, original code by Cas Nuy, upload on his behalf

IMO there should be only one place where the plugin can be found.

cas

cas

2010-05-25 08:11

reporter   ~0025608

I was aware of it. I have not found enough time to deal with GIT (despite support from Kirill!).
Are there additional plans to deal with plugins, something like mantisbt.org/plugins?

rrauenza

rrauenza

2010-10-03 22:16

reporter   ~0026935

I'm unable to get the cli version of the reminder working (haven't tried the lynx hack yet; I'd like to not have to use it.)

I'm using version 111, mantis 1.2.3. I even changed the bug_reminder_mail.php to be:

$t_login = config_get( 'plugin_Reminder_reminder_login' );
$t_passwd = config_get( 'plugin_Reminder_reminder_passwd' );
$ok=auth_attempt_script_login( $t_login, $t_passwd );

It works from the browser, but I'm already authenticated there.

rrauenza

rrauenza

2010-10-03 23:29

reporter   ~0026936

Where is plugin_Reminder_reminder_login supposed to be defined? I put it in /etc/mantis/config_inc.php and I think it wasn't finding it.

anyway, I wrote a generic solution:

#!/usr/bin/perl -w

by Rich Rauenzahn, rrauenza@gmail.com

use strict;

use HTTP::Cookies;
use LWP;

my $pw = "password";
my $user = "reminder";
my $mantis = "https://www.example.com/mantis/&quot;;

Create a jar for auth cookies to go into.

my $jar = HTTP::Cookies->new();

make a user agent.

my $ua= LWP::UserAgent->new();

by default, user agent's don't follow 302's with POSTs

push @{ $ua->requests_redirectable }, 'POST';

add cookie jar to user agent

$ua->cookie_jar($jar);

login the user

my $req = HTTP::Request->new(POST => "$mantis/login.php");
$req->content("return=index.php&username=$user&password=$pw&secure_session=on");
$req->content_type('application/x-www-form-urlencoded');

my $res = $ua->request($req);

if ($res->is_success) {
#print $res->content;
} else {
print $res->status_line, "\n";
}

request the reminders.

#my $req = HTTP::Request->new(GET => "$mantis/plugins//Reminder/scripts/bug_reminder_mail_test.php");
$req = HTTP::Request->new(GET => "$mantis/plugins//Reminder/scripts/bug_reminder_mail.php");
$res = $ua->request($req);
if ($res->is_success) {
print $res->content;
} else {
print $res->status_line, "\n";
}

cas

cas

2010-10-04 02:00

reporter   ~0026938

Last edited: 2010-10-04 02:26

The login is defined in the config of this plugin. With the function auth_attempt_script_login, no password is required. There is also no password registered for this.
So go to manage Plugins and click on the reminder plugin to configure it properly.

rrauenza

rrauenza

2010-10-04 11:18

reporter   ~0026944

Ah! I see it now:

Run scheduled script on the account of: admin

rrauenza

rrauenza

2010-10-15 23:42

reporter   ~0027043

I can't get the command line version of the reminder to work. Using Mantis 1.2.3

[rrauenza@tendo scripts]$ pwd
/usr/share/mantis/plugins/Reminder/scripts
[rrauenza@tendo scripts]$ php ./bug_reminder_mail.php

It has no output. What is also weird is I added echo "hello\n" to the code:

$ head bug_reminder_mail.php
<?php

This page sends an E-mail if a due date is getting near

includes all due_dates not met

require_once( '../../../core.php' );
echo "hello\n";
$t_login = config_get( 'plugin_Reminder_reminder_login' );
$ok=auth_attempt_script_login( $t_login );
echo $ok;
$t_core_path = config_get( 'core_path' );
require_once( $t_core_path.'bug_api.php' );

Something weird must be going on...

cas

cas

2010-10-16 04:37

reporter   ~0027044

If you run it in the browser, results are send to the screen.
Have you tried this?
Cannot tell you how to schedule, that is dependant on your platform.

rrauenza

rrauenza

2010-10-16 11:05

reporter   ~0027045

yeah, that's what is weird. It runs fine from the browser -- and even fine from the perl script above. But running it standalone.. it just does nothing. Doesn't even echo 'hello'. (which does echo in the browser). Weird.

Am I missing some env variables or something while running it externally?

cas

cas

2010-10-16 11:36

reporter   ~0027048

Probably then fails on a path setting. Just put the echo before the require_once and that will work.
Suggest to switch to the correct path before calling.

rrauenza

rrauenza

2010-10-16 11:49

reporter   ~0027049

What's the correct path?

This fails even worse:

pwd

/usr/share/mantis

php plugins/Reminder/scripts/bug_reminder_mail.php

PHP Warning: require_once(../../../core.php): failed to open stream: No such file or directory in /usr/share/mantis/plugins/Reminder/scripts/bug_reminder_mail.php on line 4
PHP Fatal error: require_once(): Failed opening required '../../../core.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/mantis/plugins/Reminder/scripts/bug_reminder_mail.php on line 4
You have new mail in /var/spool/mail/Maildir/root
[root@tendo mantis]#

In order for the require to work with ../../.. I have to run it out of the plugin's actual directory.

Hmm, yes, for some reason the 'require' makes the script exit prematurely from the command line.

<?php

This page sends an E-mail if a due date is getting near

includes all due_dates not met

echo "hello1\n";
require_once( '../../../core.php' );
echo "hello2\n";
$t_login = config_get( 'plugin_Reminder_reminder_login' );
[...]

(I didn't get these following error messages either until I added the hello above the require.)

php bug_reminder_mail.php

hello1
PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /usr/share/mantis/core/compress_api.php on line 68
PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/share/mantis/plugins/Reminder/scripts/bug_reminder_mail.php:4) in /usr/share/mantis/core.php on line 154
PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/share/mantis/plugins/Reminder/scripts/bug_reminder_mail.php:4) in /usr/share/mantis/core.php on line 156
PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/share/mantis/plugins/Reminder/scripts/bug_reminder_mail.php:4) in /usr/share/mantis/core.php on line 161
[root@tendo scripts]#

Too bad php doesn't have a command line debug mode like perl :(

It's working via my perl script that accesses the web page, but it is really odd I can't run this from the shell.

cas

cas

2010-10-16 12:24

reporter   ~0027050

The messages about the headers occur because of the Hello so that matches.
Looks like some trial and error excercise!!

bruzzler

bruzzler

2010-10-19 03:50

reporter   ~0027079

Hi,
I get the following error, when I try to install the reminder 1.11:

APPLICATION ERROR #200
A required parameter to this page (reminder_bug_status) was not found.

How can I fix this? (I'm using Mantis 1.23)

Thanks
André

cas

cas

2010-10-19 04:45

reporter   ~0027080

when exactly does this happen, when having clicked on Install or later in the process?

bruzzler

bruzzler

2010-10-19 05:55

reporter   ~0027081

after saving the configuration..

bruzzler

bruzzler

2010-10-19 06:00

reporter   ~0027082

Edit: that means, after "Update definition"

cas

cas

2010-10-19 07:41

reporter   ~0027086

Cannot reproduce this error. Tried a fresh install of Mantis 1.2.3 and installed/configured the plugin without issue.
Suggest you uninstall, remove the plugin from disk and start again

bruzzler

bruzzler

2010-10-20 02:55

reporter   ~0027093

reinstall worked for me, thanks!

mantistestor

mantistestor

2010-10-25 10:37

reporter   ~0027153

Last edited: 2010-10-25 10:38

This Problem still exist with Mantis 1.2.03a and Reminder.111.zip
The Output Date by Default is 1969-12-31

<i>If the due_date is not set, the year of the due date will have a value of 1970 (default value).
Do you notice similar behavior with the latest version?

The manager overview does not have the split as mentioned but this may become available later.</i>

cas

cas

2010-10-25 12:03

reporter   ~0027156

Please test with a final release.
In addition ensure that due-date is always filled, see my solution here:
http://www.mantisbt.org/bugs/view.php?id=12467

mantistestor

mantistestor

2010-10-26 04:13

reporter   ~0027162

thx for response cas
do you mean the final release of mantis? then unfortunatly i can not use the plugin. upgrade to the final release is not possible in cause of tons of changes in code.
due_date code like in http://www.mantisbt.org/bugs/view.php?id=12467 [^] is not in the config.inc.php of 1.2.03a.

cas

cas

2010-10-26 04:44

reporter   ~0027164

Last edited: 2010-10-26 04:45

Sounds familiar to me, upgrading can be a pain after making may changes.Its my reason to convert my changes where opossible to a plugin!
That code is new and certainly not in the standard release, so you have to make another change to your version.
I am quite sure this also works in 1.2.03a, just follow the steps as outlined in note 27110 of issue 12467.

mantistestor

mantistestor

2010-10-26 05:11

reporter   ~0027166

First i placed in config.inc.php de due_date handling-code.
Then i have the Problem, that in bug_report_page.php the code for replacement
<i>if ( $f_due_date == '' ) {
$f_due_date = date_get_null();</i>
dont exist.

cas

cas

2010-10-26 06:22

reporter   ~0027167

In that case, place the code just after:
$f_due_date = gpc_get_string( 'due_date', '');
I assume that line of code does exist.
You should find that around line 116.

mantistestor

mantistestor

2010-10-26 06:51

reporter   ~0027168

Last edited: 2010-10-26 06:52

sadly this code
<i>$f_due_date = gpc_get_string( 'due_date', '');</i>
does not exist in bug_report_page.php

i postet the file here: http://www.mantisbt.org/bugs/file_download.php?file_id=3081&amp;type=bug

no problem when you dont have the abillity or will to watch out!
greets

cas

cas

2010-10-26 07:28

reporter   ~0027169

In that case check your bug_report.php.
Hopefully you have this code:
$t_bug_data->due_date = gpc_get_string( 'due_date', '');
if ( is_blank ( $t_bug_data->due_date ) ) {
$t_bug_data->due_date = date_get_null();
} else {
$t_bug_data->due_date = $t_bug_data->due_date;
}
Now replace that with :
$t_bug_data->due_date = gpc_get_string( 'due_date', '');
if ( is_blank ( $t_bug_data->due_date ) ) {
// CN-8 Begin
if ( ON==config_get( 'preset_duedate')) {
$t_bug_data->due_date = time()+ (config_get('preset_duedate_days') 24 60 * 60);
} else{
$t_bug_data->due_date = date_get_null();
}
// CN-8 End
}

Ofcourse make a backup first before changing.

mantistestor

mantistestor

2010-10-26 07:48

reporter   ~0027170

the code in bug_report.php is different from yours. replace this code with the new one dont work.

$t_bug_data->due_date               = gpc_get_string( 'due_date', '');
if ( is_blank ( $t_bug_data->due_date ) ) {
    $t_bug_data->due_date = date_get_null();
} else {
    $t_bug_data->due_date = db_unixtimestamp ( $t_bug_data->due_date, true ) + 1;
}
cas

cas

2010-10-26 07:51

reporter   ~0027171

In that case new code would be:
$t_bug_data->due_date = gpc_get_string( 'due_date', '');
if ( is_blank ( $t_bug_data->due_date ) ) {
// CN-8 Begin
if ( ON==config_get( 'preset_duedate')) {
$t_bug_data->due_date = time()+ (config_get('preset_duedate_days') 24 60 * 60);
} else{
$t_bug_data->due_date = date_get_null();
}
// CN-8 End
}else {
$t_bug_data->due_date = db_unixtimestamp ( $t_bug_data->due_date, true ) + 1;
}

mantistestor

mantistestor

2010-10-26 07:59

reporter   ~0027172

this give a failure <b>Parse error: syntax error, unexpected '<' in</b>

dude, you spent much time on that... no problem when you leave now! Support for a not uo2date mantis installation is for sure difficult. Thank you very much for your work here!

<?php

Mantis - a php based bugtracking system

Mantis 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.

#

Mantis 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 Mantis. If not, see <http://www.gnu.org/licenses/>.

/**
 * This page stores the reported bug
 *
 * @package MantisBT
 * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
 * @copyright Copyright (C) 2002 - 2009  Mantis Team   - mantisbt-dev@lists.sourceforge.net
 * @link http://www.mantisbt.org
 */
 /**
  * Mantis Core API's
  */
require_once( 'core.php' );

$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'string_api.php' );
require_once( $t_core_path.'file_api.php' );
require_once( $t_core_path.'bug_api.php' );
require_once( $t_core_path.'custom_field_api.php' );

form_security_validate( 'bug_report' );

access_ensure_project_level( config_get('report_bug_threshold' ) );

$t_bug_data = new BugData;
$t_bug_data->build              = gpc_get_string( 'build', '' );
$t_bug_data->platform               = gpc_get_string( 'platform', '' );
$t_bug_data->os                 = gpc_get_string( 'os', '' );
$t_bug_data->os_build               = gpc_get_string( 'os_build', '' );
$t_bug_data->version            = gpc_get_string( 'product_version', '' );
$t_bug_data->profile_id         = gpc_get_int( 'profile_id', 0 );
$t_bug_data->handler_id         = gpc_get_int( 'handler_id', 0 );
$t_bug_data->view_state         = gpc_get_int( 'view_state', config_get( 'default_bug_view_status' ) );

$t_bug_data->category_id            = gpc_get_int( 'category_id', 0 );
$t_bug_data->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->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_steps_to_reproduce' ) );
$t_bug_data->additional_information = gpc_get_string( 'additional_info', config_get ( 'default_bug_additional_info' ) );

<!-- old
$t_bug_data->due_date = gpc_get_string( 'due_date', '');
if ( is_blank ( $t_bug_data->due_date ) ) {
$t_bug_data->due_date = date_get_null();
} else {
$t_bug_data->due_date = db_unixtimestamp ( $t_bug_data->due_date, true ) + 1;
}
old -->
<!-- neu -->
$t_bug_data->due_date = gpc_get_string( 'due_date', '');
if ( is_blank ( $t_bug_data->due_date ) ) {
// CN-8 Begin
if ( ON==config_get( 'preset_duedate')) {
$t_bug_data->due_date = time()+ (config_get('preset_duedate_days') 24 60 * 60);
} else{
$t_bug_data->due_date = date_get_null();
}
// CN-8 End
}else {
$t_bug_data->due_date = db_unixtimestamp ( $t_bug_data->due_date, true ) + 1;
}
<!-- neu -->

$f_file                 = gpc_get_file( 'file', null ); /** @todo (thraxisp) Note that this always returns a structure */
                                                        # size = 0, if no file
$f_report_stay          = gpc_get_bool( 'report_stay', false );
$t_bug_data->project_id         = gpc_get_int( 'project_id' );

$t_bug_data->reporter_id        = auth_get_current_user_id();

$t_bug_data->summary            = trim( $t_bug_data->summary );

$t_bug_data->target_version     = access_has_project_level( config_get( 'roadmap_update_threshold' ), $t_bug_data->project_id ) ? gpc_get_string( 'target_version', '' ) : '';

# if a profile was selected then let's use that information
if ( 0 != $t_bug_data->profile_id ) {
    if ( profile_is_global( $t_bug_data->profile_id ) ) {
        $row = user_get_profile_row( ALL_USERS, $t_bug_data->profile_id );
    } else {
        $row = user_get_profile_row( $t_bug_data->reporter_id, $t_bug_data->profile_id );
    }

    if ( is_blank( $t_bug_data->platform ) ) {
        $t_bug_data->platform = $row['platform'];
    }
    if ( is_blank( $t_bug_data->os ) ) {
        $t_bug_data->os = $row['os'];
    }
    if ( is_blank( $t_bug_data->os_build ) ) {
        $t_bug_data->os_build = $row['os_build'];
    }
}
helper_call_custom_function( 'issue_create_validate', array( $t_bug_data ) );

# Validate the custom fields before adding the bug.
$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug_data->project_id );
foreach( $t_related_custom_field_ids as $t_id ) {
    $t_def = custom_field_get_definition( $t_id );
    if ( $t_def['require_report'] && !gpc_isset_custom_field( $t_id, $t_def['type'] ) ) {
        error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
        trigger_error( ERROR_EMPTY_FIELD, ERROR );
    }
    if ( !custom_field_validate( $t_id, gpc_get_custom_field( &quot;custom_field_$t_id&quot;, $t_def['type'], NULL ) ) ) {
        error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
        trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
    }
}

# Allow plugins to pre-process bug data
$t_bug_data = event_signal( 'EVENT_REPORT_BUG_DATA', $t_bug_data );

# Create the bug
$t_bug_id = bug_create( $t_bug_data );

# Mark the added issue as visited so that it appears on the last visited list.
last_visited_issue( $t_bug_id );

# Handle the file upload
if ( !is_blank( $f_file['tmp_name'] ) && ( 0 &lt; $f_file['size'] ) ) {
    file_add( $t_bug_id, $f_file, 'bug' );
}

# Handle custom field submission
foreach( $t_related_custom_field_ids as $t_id ) {
    # Do not set custom field value if user has no write access.
    if( !custom_field_has_write_access( $t_id, $t_bug_id ) ) {
        continue;
    }

    $t_def = custom_field_get_definition( $t_id );
    if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( &quot;custom_field_$t_id&quot;, $t_def['type'], $t_def['default_value'] ) ) ) {
        error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
        trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
    }
}

$f_master_bug_id = gpc_get_int( 'm_id', 0 );
$f_rel_type = gpc_get_int( 'rel_type', -1 );

if ( $f_master_bug_id > 0 ) {
    # it's a child generation... let's create the relationship and add some lines in the history

    # update master bug last updated
    bug_update_date( $f_master_bug_id );

    # Add log line to record the cloning action
    history_log_event_special( $t_bug_id, BUG_CREATED_FROM, '', $f_master_bug_id );
    history_log_event_special( $f_master_bug_id, BUG_CLONED_TO, '', $t_bug_id );

    if ( $f_rel_type >= 0 ) {
        # Add the relationship
        relationship_add( $t_bug_id, $f_master_bug_id, $f_rel_type );

        # Add log line to the history (both issues)
        history_log_event_special( $f_master_bug_id, BUG_ADD_RELATIONSHIP, relationship_get_complementary_type( $f_rel_type ), $t_bug_id );
        history_log_event_special( $t_bug_id, BUG_ADD_RELATIONSHIP, $f_rel_type, $f_master_bug_id );

        # Send the email notification
        email_relationship_added( $f_master_bug_id, $t_bug_id, relationship_get_complementary_type( $f_rel_type ) );
    }
}

email_new_bug( $t_bug_id );

helper_call_custom_function( 'issue_create_notify', array( $t_bug_id ) );

# Allow plugins to post-process bug data with the new bug ID
event_signal( 'EVENT_REPORT_BUG', array( $t_bug_data, $t_bug_id ) );

form_security_purge( 'bug_report' );

html_page_top1();

if ( !$f_report_stay ) {
    html_meta_redirect( 'view_all_bug_page.php' );
}

html_page_top2();

?>
<br />
<div align="center">
<?php
echo lang_get( 'operation_successful' ) . '<br />';
print_bracket_link( string_get_bug_view_url( $t_bug_id ), lang_get( 'view_submitted_bug_link' ) . " $t_bug_id" );
print_bracket_link( 'view_all_bug_page.php', lang_get( 'view_bugs_link' ) );

if ( $f_report_stay ) {

?>
<p>
<form method="post" action="<?php echo string_get_bug_report_url() ?>">
<input type="hidden" name="category_id" value="<?php echo $t_bug_data->category_id ?>" />
<input type="hidden" name="severity" value="<?php echo $t_bug_data->severity ?>" />
<input type="hidden" name="reproducibility" value="<?php echo $t_bug_data->reproducibility ?>" />
<input type="hidden" name="profile_id" value="<?php echo $t_bug_data->profile_id ?>" />
<input type="hidden" name="platform" value="<?php echo $t_bug_data->platform ?>" />
<input type="hidden" name="os" value="<?php echo $t_bug_data->os ?>" />
<input type="hidden" name="os_build" value="<?php echo $t_bug_data->os_build ?>" />
<input type="hidden" name="product_version" value="<?php echo $t_bug_data->version ?>" />
<input type="hidden" name="target_version" value="<?php echo $t_bug_data->target_version ?>" />
<input type="hidden" name="build" value="<?php echo $t_bug_data->build ?>" />
<input type="hidden" name="report_stay" value="1" />
<input type="hidden" name="view_state" value="<?php echo $t_bug_data->view_state ?>" />
<input type="hidden" name="due_date" value="<?php echo $t_bug_data->due_date ?>" />
<input type="submit" class="button" value="<?php echo lang_get( 'report_more_bugs' ) ?>" />
</form>
</p>
<?php
}
?>
</div>

<?php html_page_bottom1( FILE ) ?>

cas

cas

2010-10-26 08:08

reporter   ~0027173

Last edited: 2010-10-26 08:09

You are commenting code in the HTML way (where you say old and neu).
If you want to comment lines, use the double forward slashes (//).
Then it will be ok.

bruzzler

bruzzler

2010-11-22 03:26

reporter   ~0027442

Hi,
I have a problem using the reminder plugin:
I installed it correctly and I also receive the message "Finished processing your selection" when calling the page http://.../plugins/Reminder/scripts/bug_reminder_mail.php
But i don't receive an email, do I have to adjust something in the config?
Thanks in advance and regards
André

bruzzler

bruzzler

2010-11-22 03:55

reporter   ~0027444

ah okay, I forgot the spam filter. Resolved...

atrol

atrol

2010-12-17 14:51

developer   ~0027638

cas, I think this issue can be closed as there is now an own project "Plugin - Reminder" for it.
But this will introduce the problem, that there will be no longer a central place for the storage of source code.
Please have also again a look at 0010153:0025607 where the first confusion starts.

Maybe time to think about your own Git project?

atrol

atrol

2010-12-17 15:02

developer   ~0027639

I moved the issue to the new project.

As a "poor man's Git" you could create one issue to hold the source code and set the issue sticky.

cas

cas

2011-02-08 02:49

reporter   ~0028183

Uploaded version 1.12 which has protection build in to run the scripts simply from the browser

binunice

binunice

2011-03-19 14:26

reporter   ~0028443

Great Plugin.
Can you pls guide me to set reminder_days_treshold in hours instead of days

cas

cas

2011-03-21 03:13

reporter   ~0028445

@binunice,
that currently is not possible but can be easily added in a next version.
It would mean very frequent running of a scheduled task but that is not necesarily an issue.

cas

cas

2011-03-21 03:43

reporter   ~0028446

Appeared faster than initially expected.
Try this version 1.20 and see if it does the trick.

maschneider

maschneider

2011-03-30 08:53

reporter   ~0028507

i like the plugin and it solve first my problem.

But with respect to cas the quality of the code i not the best to include more features. I m looking for people to want to rewrite a Reminder Plugin.

One mayor goal are, to have more information about the Task your are reminding on. (Just patch this plugin to see the summary).

The second mayor goal is to have a option to remind you on some other cases like:

  • "bug is new since 3 weeks without Acknowledged"
  • "bug is Assigned for more than 4 weeks"
  • ...
    make this option as flexible as could be (ideas welcome) and not only be limit to Assigned and due_date.

Feedback welcome.

cas

cas

2011-03-30 14:04

reporter   ~0028512

Not sure what your first problem is but glad it is solved.
Feel free to improve the code. For me there is no reason to rewrite this since it covers my needs. Extensions to me are still easy enough.
Just to be clear, one is reminded about the issue and the intention is that you get all the details online. I personally do not believe to put all details in the mail.
If you want to discuss tasks, please have a look at the tasks plugin.
Till now reminders do not cover tasks but that would be easy to add with this plugin.

belfar

belfar

2011-11-23 18:37

reporter   ~0030274

teste

inno-it

inno-it

2011-11-25 05:42

reporter   ~0030338

Last edited: 2011-11-25 05:42

is this plugin compatible with Mantis 1.2.8 ? I`m getting the following error by executing the bug_reminder_mail.php. Hope you can help me.Thank you.

PHP Warning: require_once(../../../core.php): failed to open stream: No such fi
le or directory in C:\inetpub\mantis\plugins\Reminder\scripts\bug_reminder_mail.
php on line 9
PHP Fatal error: require_once(): Failed opening required '../../../core.php' (i
nclude_path='.;C:\php\pear') in C:\inetpub\mantis\plugins\Reminder\scripts\bug_r
eminder_mail.php on line 9

oxomichael

oxomichael

2011-12-28 09:00

reporter   ~0030716

@inno-it

I change all the line
require_once( '../../../core.php' )
by
require_once( realpath(dirname(FILE)).'/../../../core.php' );

Supp

Supp

2012-02-26 15:23

reporter   ~0031326

@oxomichael, cas & co.

After making changes as per your recomendation and running php /path/mantis/Reminder/scripts/bug_reminder_mail.php, (runing vintage 1.2.8, apache+mysql),

I still get an error 0000401 (w/ debugging on):

Variable Value Type
0 SELECT * FROM mantis_user_pref_table WHERE user_id=1 AND project_id=0 string
1 0.0012 string
2 user_pref_api.php:171 user_pref_cache_row() string
5
Variable Value Type
0 select id,handler_id,project_id from mantis_bug_table where status=ALL and due_date<=1330287479 and handler_id<>0 and due_date>1 and string
project_id=1 order by handler_id
1 0.0004 string
2 bug_reminder_mail.php:70 - string
t_backtrace
Variable Value Type
Filename Line Function Args
/home/mantis/core/database_api.php 393 - - trigger_error ( <string>'401', <integer>256 )
( <string>'select id,handler_id,project_id from mantis_bug_table
/home/mantis/plugins/Reminder/scripts/bug_reminder_mail.php 70 - - db_query_bound where status=ALL and due_date<=1330287479 and handler_id<>0 and
due_date>1 and project_id=1 order by handler_id' )

Help please, I'll gladly pay for solution (as we need this feature very much)...

gerald2545

gerald2545

2012-03-07 13:22

reporter   ~0031405

I installed it today and had to modify plugins/Reminder/scripts/bug_reminder_mail.php in order to work
1/ cf note 0010153:0030716
2/ line $baseline = time(true)+ ($t_rem_days$multipy60*60);
replace $multipy by $multiply
3/choosing days / hours doesn't work as expected
change the following lines :
if (ON == $t_rem_hours){
$multiply=24;
} else{
$multiply=1;
}
by

$multiply=1;
if (OFF == $t_rem_hours){
$multiply=24;
}
thank you for your job

gerald

obones

obones

2012-03-27 08:48

reporter   ~0031544

I agree with points 2 and 3 made by gerald2545 in http://www.mantisbt.org/bugs/view.php?id=10153#c31405
After those two changes are in, everything is working fine.

obones

obones

2012-03-27 10:55

reporter   ~0031549

I have uploaded the french translation, should anyone find it useful.

johmart

johmart

2012-06-28 09:46

reporter   ~0032214

Nice plugin, just what I needed. I used the plugin with mantis 1.2.10, no major problems so far.

The option "use hours instead of days" seems to have been evaluated the wrong way around, plus in one of the scripts multiple was mispelled as multipe so the setting didn't have an effect at all. I've corrected these problems in Reminder121.zip (attached).

I've also extended the plugin to allow more than just one status to be selected for reminders. I want to be able to send reminders not just for one status but for a whole group of statusses. So the single drop down box has been modified into a multiple selection box, the SQL select statement adjusted accordingly.

Unfortunately, this required some code cloning from print_api and helper_api since I didn't want to change code in mantis proper. Maybe someone would like to integrate my change to check_selected() into helper_api.

funta222

funta222

2012-08-20 06:13

reporter   ~0032616

I was wondering if the Feedback reminder email should be send to the Reporter instead of the Handler. Consider that the issue hasn't been assigned yet and a handler candidate might hav a question to the issie starter before (self-)assignment.

cas

cas

2012-08-23 03:29

reporter   ~0032622

Last edited: 2012-08-24 04:14

@funta222, it should send the email to the reporter. I think you refer to the bug_feedback_mail script.
Simply replace "$handler = $row1['handler_id'];"
with "$handler = $row1['reporter_id'];""
This you would find around line 34

cas

cas

2012-08-23 03:33

reporter   ~0032623

@johmart, I guess you have not verified all scripts since some of them are not yet adjusted to work with multiple statusses.

funta222

funta222

2012-08-30 03:07

reporter   ~0032703

Last edited: 2012-08-30 03:08

Reminder122.zip

  • Fixed Changelog, added missing 1.21 changes
  • Fixed broken multi status intoduced in 1.21
  • Fixed test scripts
  • Feedback Reminder Email recipient now defaults to Reporter (before was: Handler)
  • Fixed Excel2010 warning about wrong file type: Csv vs. Xls
  • Introduced setting for character used as Csv column sparator (defaults to ; now)
webmasterqol

webmasterqol

2012-08-30 11:00

reporter   ~0032730

Hello, wonderful plugin, thank you for your efforts!

I am having a confusing problem with the plugin, and suspect that I might just need to change my configuration. I am using Mantis 1.2.8 schema 183, and just upgraded to Reminder 1.22.

Reminder successfully sends a reminder email every day (as intended) but the problem I'm having is that only ONE bug link is ever listed in the email I receive. All of my bugs have due dates, and when I use the test script at plugins/Reminder/scripts/bug_reminder_mail_test.php I have 10 bugs listed, but I only ever receive a link to one of the bugs in the Reminder email.

I used a diff tool to check for and correct differences between the test and production scripts (minus echo statements) and the production script still does not work correctly.

Any suggestions you can offer will be most appreciated.

Thank you!

funta222

funta222

2012-09-07 05:13

reporter   ~0032811

@webmasterqol
Unfortunately I have no idea.

I'm getting multiple URLs in both Due Reminder and Feedback Reminder emails (v1.22)

Do you see the last line in your emails? :

"Please do not reply to this message"

webmasterqol

webmasterqol

2012-09-07 08:24

reporter   ~0032813

@funta222

Thank you for your reply. Yes, the last line of the reminder email says "Please do not reply to this message". It only ever contains 1 URL despite many bugs being due within the configured 7 day timeframe. I have also noticed that if I change configuration options for the plugin, such as turning on or off "Generate manager mail by project", "Generate handler mail", "Group issues (Only when below is off)", etc., that the plugin stops working altogether.

Would anyone be willing to share your configuration settings that are now working?

madmin

madmin

2012-09-26 06:46

reporter   ~0032946

i have a problem that the email reminder link is http://localhostview.php?id=27

The server is setup at internal network and had firewall NAT. so that i can connect to server from private IP or public IP. If i set $g_path = private IP , i can't connect from public . if i set $g_path = public IP then i cannot connect from private IP.
how can i fix it ?

Sorry for my poor english
Many thanks.

cas

cas

2012-09-27 04:07

reporter   ~0032961

You could define the g_path like this:

--- Path definition

if ($_SERVER["SERVER_NAME"] == "189.189.189.189"){
$g_path = 'http://189.189.189.189/';
$g_short_path = '189.189.189.189/';
} else {
$g_path = 'http://localhost/';
$g_short_path = 'http://localhost/';
}

madmin

madmin

2012-09-28 07:04

reporter   ~0032977

Thanks cas
i had try many time but fail. and i don't understand .would you explain more detail, since i am newbie. many thanks

my httpd.conf
ServerName www.abc.com.hk:8088

so config_inc.php like this? is the "SERVER_NAME" is variable?

if ($_SERVER["SERVER_NAME"] == "www.abc.com.hk:8088"){
$g_path = 'http://www.abc.com.hk:8088/';
$g_short_path = 'http://www.abc.com.hk:8088/';
}
else {
$g_path = 'http://192.168.0.100:8088/';
$g_short_path = 'http://192.168.0.100:8088/';
}

cas

cas

2012-09-28 07:44

reporter   ~0032978

Yes, that is how it works.
You can find more info on Servername here:
http://php.net/manual/en/reserved.variables.server.php

What happens is that the path settings are based upon servername. This enables mantis to run under 2 different ones. The second one could also be http://localhost:8088 assuming that 192.168.1.100 is the ip-address of the server itself.

madmin

madmin

2012-09-28 09:09

reporter   ~0032980

if i set that , i can go from internal network use Private IP http://192.168.0.100:8088/'; [^]
But i can't go http://www.abc.com.hk:8088/ from outside.

and i also can't send the email reminder

C:\wamp\www\plugins\Reminder\scripts>C:\wamp\bin\php\php5.4.3\php.exe bug_remind
er_mail.php
PHP Notice: Undefined index: SERVER_NAME in C:\wamp\www\config_inc.php on line
26
PHP Stack trace:
PHP 1. {main}() C:\wamp\www\plugins\Reminder\scripts\bug_reminder_mail.php:0
PHP 2. require_once() C:\wamp\www\plugins\Reminder\scripts\bug_reminder_mail.p
hp:9
PHP 3. require_once() C:\wamp\www\core.php:66

Notice: Undefined index: SERVER_NAME in C:\wamp\www\config_inc.php on line 26

Call Stack:
0.0016 157160 1. {main}() C:\wamp\www\plugins\Reminder\scripts\bug_rem
inder_mail.php:0
0.0027 189560 2. require_once('C:\wamp\www\core.php') C:\wamp\www\plug
ins\Reminder\scripts\bug_reminder_mail.php:9
0.0119 327816 3. require_once('C:\wamp\www\config_inc.php') C:\wamp\ww
w\core.php:66

Possible Whitespace/Error in Configuration File - Aborting. Output so far follow
s:<br />string(409) "\nNotice: Undefined index: SERVER_NAME in C:\wamp\www\co
nfig_inc.php on line 26\n\nCall Stack:\n 0.0016 157160 1. {main}() C:\
wamp\www\plugins\Reminder\scripts\bug_reminder_mail.php:0\n 0.0027 1
89560 2. require_once('C:\wamp\www\core.php') C:\wamp\www\plugins\Remin
der\scripts\bug_reminder_mail.php:9\n 0.0119 327816 3. require_once('
C:\wamp\www\config_inc.php') C:\wamp\www\core.php:66\n\n"

cas

cas

2012-09-28 09:40

reporter   ~0032982

SERVER_NAME is quite normal with php 5 so not sure what is wrong on your config.
As for access from the outside, did you configure the firewall correct?

madmin

madmin

2012-10-04 03:30

reporter   ~0033029

yes. firewall config should be correct .

funta222

funta222

2012-10-12 04:45

reporter   ~0033172

@webmasterqol
here's my reminder config:

Mantis Send Reminder E-Mail: Configuration
Body of the Reminder message: Following issue will be Due shortly
E-mail address of sender: mantis@intranet.yourdomain.com
Number of days (hours) before due date: 2
Use Hours instead of Days: Off
Select project: All Projects
Only select issues with status: assigned
Generate manager mail by project: Off
Generate handler mail: On
Group issues (Only when below is off): On
Seperate grouped mail by project (Only when above is off): Off
Ignore issues with Due date not set: On
Ignore issues with Due dates in the past: Off
Store reminder as note (only for handler): Off
Subject for grouped mail: You have Mantis issues approaching their Due Date
Start body grouped mail: Please review the following Mantis issues
End body grouped mail: Please do not reply to this message

Mantis Send Feedback E-Mail
Select project to receive Feedback-mail: All Projects
Only select issues with status: feedback
Subject of the Email for Feedback script: Mantis issues requiring your attention
Run scheduled script on the account of: Administrator
Screen text when finished if run in browser: Finished processing your selection

Export Settings
Csv Column separator character: ;

Lisandro1987

Lisandro1987

2012-10-18 13:45

reporter   ~0033267

Last edited: 2012-10-19 11:06

EDITED: Excellent plugin!!!

samwilson

samwilson

2013-03-07 02:12

reporter   ~0035402

I have added this plugin to Github, so I can do a couple of tweaks to it:
https://github.com/samwilson/MantisBT-Reminder

Patriciow

Patriciow

2013-05-11 09:27

reporter   ~0036828

Hi Nuy,

I have a synology and I am new in MantisBT, and I try to install some usefull plugins, I see the remider will be very usefull for me, then I installed it and send an error, described below, others plugins works very well.

I have a synology platform with mysql.
Can it be resolved ?, thanks

APPLICATION ERROR 0000401
Database query failed. Error received from database was 0001064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and due_date>1 and due_date<=1368451325' at line 1 for the query: select mantis_bug_table.id,summary,due_date,username,realname from mantis_bug_table,mantis_user_table where mantis_bug_table.handler_id=mantis_user_table.id and status in () and due_date>1 and due_date<=1368451325.

samwilson

samwilson

2013-05-11 19:09

reporter   ~0036830

Could I humbly suggest that this issue be closed, and future bugs and features for the Reminder plugin be opened as separate issues on the 'Plugins - Reminder' project? Then, they can be dealt with separately.

This page just seems to be a bit too big! :-)

dregad

dregad

2013-10-05 10:42

developer   ~0038211

Plugin now hosted in the MantisBT plugins organization at Github https://github.com/mantisbt-plugins/Reminder.

The repository contains the full history of the code from the zip files uploaded here by cas, plus a few additional fixes and improvements by Sam Wilson (0010153:0035402).

laoli4121

laoli4121

2013-11-12 21:26

reporter   ~0038539

who developer can help to add the attachment chinese traditional lang into github project.
thanks!

govind

govind

2013-12-01 22:05

reporter   ~0038763

gbvfghf

pkowal007

pkowal007

2014-04-07 06:13

reporter   ~0039846

Gentlemen,

I use the Reminder 1.22.

I do not understand one thing ... how to set the date of the notification before you get a reminder? I want to set the date for all notifications (each individual) but do not know where to do this ...

Regards,
pkowal007

rakekniven

rakekniven

2014-04-08 06:11

reporter   ~0039881

Please close and lock this issue.
People should stay at github.

btw. how to stop being notified by this never ending issue thread?

cas

cas

2014-04-08 06:28

reporter   ~0039882

Remove yourself from the monitorlist...........

BiChris

BiChris

2014-06-03 04:35

reporter   ~0040728

I have a feature request for the Reminder

The idea is to use an additional Status (WaitingFor) in order to "park" tickets not active for some time (i.e. fixed with next release in June).

These tickets should be excluded in statistics, filters, ... so the Reminder is great to be reminded when they become due.

The problem is that I would like to avoid tickets in this status without a due date. What I need is a possibility to inform the assigned user if a ticket is in this status without a due date. Tickets in another Status do not require a due date.

A possible solution could be an option: Warn empty due dates for status: xxxx
This option could be ignored if not set so that it is not in conflict with the existing setup

Would it be possible to add this feature?

cas

cas

2014-06-03 09:20

reporter   ~0040735

For this you can check out the query plugin which allows you to freely create queries and have the results send out as xls.

nvcuong0207

nvcuong0207

2014-06-09 23:45

reporter   ~0040786

Last edited: 2014-06-10 02:42

I want config to auto send email when it is field Due_Date before 2 days.
Can you help me, please!

cas

cas

2014-06-10 08:01

reporter   ~0040794

Please check the documentation, it is described in there.

vasut

vasut

2016-06-29 01:11

reporter   ~0053477

I have problem with automatic sending emails.
When I try bug_feedback_mail_test.php, it works.
When I try to run script bug_reminder_mail.php, i get message "It is not allowed to run this script through the webserver."

I'm trying to add script to cron task via hosting settings (i don't have ssh access), but i think there is not allowed CLI in my hosting.
No emails received.

atrol

atrol

2016-06-29 02:00

developer   ~0053478

@vasut, please don't use this issue to discuss any problems or bugs.
Instead of this, you can report a new issue.

I will close this issue to prevent more activity in it.