View Issue Details

IDProjectCategoryView StatusLast Update
0024706Plugin - ReminderGeneralpublic2019-10-24 21:18
Reportercas Assigned Tocas  
PrioritynormalSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Summary0024706: Reminder plugin Version 2.13 has been released
Description

This plugin can be used to send periodic email reminders to bug reporters,
managers, and assignees.

The files in the plugins/Reminder/scripts directory should be run directly,
from the command line.

  1. bug_feedback_mail.php sends emails to reporters listing all bugs awaiting
    their feedback.
  2. bug_reminder_mail.php sends emails to assignees when bugs are approaching
    their due date.
  3. assigned_bugs.php sends emails to assignees listing all open bugs that are
    assigned to them.

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

Additional Information

Bugfixes and removal of deprecated functions(hope I got them all)

TagsNo tags attached.

Activities

cas

cas

2018-08-30 08:20

manager   ~0060547

Version 2.10, now with all latest scripts.

cas

cas

2018-08-30 10:05

manager   ~0060553

Fixed the bugs & Also adjusted the test scripts to show additional details

FA-jka

FA-jka

2018-08-31 05:13

reporter   ~0060568

bug_feedback_mail.php - There were no changes in the output, the fix has no visble effect

bug_reminder_mail.php (the mail, which has been send to the assigned developer) - There were no changes in the output, the fix has no visble effect

bug_reminder_mail.php (the mail, which has been send to the managers) - Completely broken - no changes in the output, no visible effect and recently additional html-tags <br> in the output

There is a new "strange" behavior in bug_reminder_mail.php - This script ist now looking for the core.php file using relative paths:

PHP Fatal error: require_once(): Failed opening required '../../../core.php' (include_path=':/usr/share/kopano/php') in /var/www/html/mantis/plugins/Reminder/scripts/bug_reminder_mail.php on line 9

When you want to use it in a cron job, you have to write a script which cd's to the absolute path of the Reminder (i.E. /var/www/html/mantis/plugins/Reminder/scripts/). Is this work-around really nessesary?

cas

cas

2018-08-31 09:31

manager   ~0060571

did you run the testscripts from the browser?

FA-jka

FA-jka

2018-08-31 10:38

reporter   ~0060574

bug_feedback_mail_test.php

id: 8 handler_id: 3 reporter_id:3 project_id: 1
id: 9 handler_id: 3 reporter_id:3 project_id: 1

diablo@heidschnuckel.de**Mantis - Tickets, die auf deine Rueckmeldung warten
Hier eine Uebersicht ueber die Tickets https://ko.heidschnuckel.de/mantis/view.php?id=8
https://ko.heidschnuckel.de/mantis/view.php?id=9
Bitte nicht auf diese automatisch generierte E-Mail antworten

Die Auswahlliste wurde abgearbeitet

cas

cas

2018-08-31 10:38

manager   ~0060575

Reviewed all the scripts and they are working on my end including additional output (please do adjust the setting in config to ON for additional details !!)
Both test scripts can be run from the browser as described in the readme.
When running the actual scripts from the commandline, you do need to change to the correct directory.
Do not consider this a workaround .

FA-jka

FA-jka

2018-08-31 10:38

reporter   ~0060576

bug_reminder_mail_test.php

Path setting retrieved : https://ko.heidschnuckel.de/mantis/
Query-handler being executed
select id,handler_id,project_id,summary from mantis_bug_table where status in (10,50) and due_date<=1535898910 and handler_id>0 and due_date>1 and mantis_bug_table.project_id NOT IN (0) order by handler_id
1
531
diablo@heidschnuckel.de**Mantis - Tickets, die in den naechsten zwei Tagen faellig werden
Hier eine Uebersicht ueber die Tickets

https://ko.heidschnuckel.de/mantis/view.php?id=5
Bitte nicht auf diese automatisch generierte E-Mail antworten
Query-Manager being executed
select id,handler_id,user_id,summary from mantis_bug_table,mantis_project_user_list_table where status in (10,50) and due_date<=1535898910 and due_date>1 and mantis_bug_table.project_id NOT IN (0) 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
2
404
534
manager@heidschnuckel.de**Mantis - Tickets, die in den naechsten zwei Tagen faellig werden
Hier eine Uebersicht ueber die Tickets https://ko.heidschnuckel.de/mantis/view.php?id=4 https://ko.heidschnuckel.de/mantis/view.php?id=5 Bitte nicht auf diese automatisch generierte E-Mail antworten

Finished Reminder Test

FA-jka

FA-jka

2018-08-31 10:50

reporter   ~0060577

You're right - i haven't seen that there is an additional configuration option. It's a bit difficult for me because my english is very bad (i am using "Google Translator" :-)

The only think remaining is, that bug_reminder_mail.php shows <br> Tags instead of line feeds / empty lines.

cas

cas

2018-08-31 10:51

manager   ~0060578

Did you verify the setting in the config which defaults to OFF?

details.JPG (15,614 bytes)   
details.JPG (15,614 bytes)   
cas

cas

2018-08-31 10:56

manager   ~0060579

This should take away the remaining "<br>" tags

Reminder212-2.zip (22,685 bytes)
FA-jka

FA-jka

2018-08-31 11:36

reporter   ~0060580

I found another <br> in bug_reminder_mail.php, which i have removed (my first php experience!). Please have a look at the attachment.

I also translated some stuff, please have a look at strings_german.txt

Now, i have another problem: Having a "first peek" at the manager-e-mail of bug_reminder_mail.php, i see that there are tickets included, which have the due date 2038-03-21 (20 years. My configuration was 2 days "before"...)

strings_german.txt (2,406 bytes)   
<?php
$s_reminder_plugin_title 			= "Erinnerungs-Emails von Mantis" ;
$s_reminder_config 					= "Einstellungen" ;
$s_reminder_bug_status				= "Nur Einträge mit folgendem Status auswählen" ;
$s_reminder_mail_subject			= "Nachrichteninhalt der Erinnerungsnachricht" ;
$s_reminder_sender					= "E-Mail-Adresse des Senders" ;
$s_reminder_days_treshold			= "Anzahl der Tage (Stunden) vor Fälligkeitsdatum";
$s_reminder_update_config			= 'Einstellungen speichern';
$s_reminder_store_as_note			= "Speichere Erinnerung als Notiz (nur für Bearbeiter)";
$s_reminder_store_enabled			= "An";
$s_reminder_store_disabled			= "Aus";
$s_reminder_ignore_unset			= "Ignoriere Einträge ohne Fälligkeitsdatum";
$s_reminder_ignore_past				= "Ignoriere Einträge mit Fälligkeitsdatum in der Vergangenheit";
$s_reminder_group_issues			= "Gruppiere Einträge (Nur wenn nächste Option Aus ist)";
$s_reminder_group_project			= "Separate, gruppierte E-Mail pro Projekt (Nur wenn vorherige Option Aus ist)";
$s_reminder_manager_overview		= "Erzeuge E-Mail für Manager pro Projekt";
$s_reminder_handler					= "Erzeuge E-Mail für Bearbeiter";
$s_reminder_group_subject			= "Betreff für gruppierte E-Mail";
$s_reminder_group_body1				= "Start des Nachrichteninhalts von gruppierter E-Mail";
$s_reminder_group_body2				= "Ende des Nachrichteninhalts von gruppierter E-Mail";
$s_reminder_project_name			= "Projekt auswählen:";
$s_reminder_download				= "Einträge mit Fälligkeitsdatum herunterladen";
$s_reminder_feedback_email			= "Mantis Versand Rückmeldungs E-Mail" ;
$s_reminder_feedback_project_name	= "Wählen Sie ein Projekt zum Empfang von Rückmeldungs-Email";
$s_reminder_feedback_status			= "Nur Einträge mit folgendem Status auswählen" ;
$s_reminder_login					= "Geplantes Skript mit folgendem Konto ausführen: " ;
$s_reminder_subject					= "Betreff der E-Mail für Rückmeldungs-Skript" ;
$s_reminder_finished				= "Text der nach Aufruf im Browser erscheint" ;
$s_reminder_plugin_desc 			= "Erinnert an fällige Einträge per Email und CSV-Export. Erinnerung bei Rückmeldungen.";
$s_reminder_hours					= "Benutze Stunden statt Tagen";
$s_reminder_export_settings			= "Export-Einstellungen";
$s_reminder_export_colsep			= "Trennzeichen der CSV-Spalten";
$s_reminder_include					= "Nur ausgewählte Projekte (Aus = Alle Projekte)";
$s_reminder_details					= "Detaillierte E-Mails (inklusive Zusammenfassung)";
strings_german.txt (2,406 bytes)   
bug_reminder_mail.php (9,023 bytes)   
<?php
# This page tests sending an E-mail if a due date is getting near
if( php_sapi_name() != 'cli' ) {
	echo "It is not allowed to run this script with PHP SAPI name: " . php_sapi_name() . ".\n";
	exit( 1 );
}

# No real email is sent nor are notes created for the various issues
require_once( '../../../core.php' );
$t_login	= config_get( 'plugin_Reminder_reminder_login' );
$ok=auth_attempt_script_login( $t_login );
$t_core_path = config_get( 'core_path' );
require_once( $t_core_path.'bug_api.php' );
require_once( $t_core_path.'email_api.php' );
require_once( $t_core_path.'bugnote_api.php' );

$t_bug_table	= db_get_table( 'bug' );
$t_man_table	= db_get_table( 'project_user_list' );
$t_rem_days		= config_get( 'plugin_Reminder_reminder_days_treshold' );
$t_rem_status	= config_get( 'plugin_Reminder_reminder_bug_status' );
$t_rem_body		= config_get( 'plugin_Reminder_reminder_mail_subject' );
$t_rem_store	= config_get( 'plugin_Reminder_reminder_store_as_note' );
$t_rem_ignore	= config_get( 'plugin_Reminder_reminder_ignore_unset' );
$t_rem_ign_past	= config_get( 'plugin_Reminder_reminder_ignore_past' );
$t_rem_handler	= config_get( 'plugin_Reminder_reminder_handler' );
$t_rem_group1	= config_get( 'plugin_Reminder_reminder_group_issues' );
$t_rem_group2	= config_get( 'plugin_Reminder_reminder_group_project' );
$t_rem_manager	= config_get( 'plugin_Reminder_reminder_manager_overview' );
$t_rem_subject	= config_get( 'plugin_Reminder_reminder_group_subject' );
$t_rem_body1	= config_get( 'plugin_Reminder_reminder_group_body1' );
$t_rem_body2	= config_get( 'plugin_Reminder_reminder_group_body2' );
$t_rem_details	= config_get( 'plugin_Reminder_reminder_details' );
$t_rem_hours	= config_get('plugin_Reminder_reminder_hours');
if (ON != $t_rem_hours){
	$multiply=24;
} else{
	$multiply=1;
}
//
// access level for manager= 70
// this needs to be made flexible
// we will only produce overview for those projects that have a separate manager
//
$baseline	= time(true)+ ($t_rem_days*$multiply*60*60);
$basenow	= time(true);

if ( ON == $t_rem_handler ) {
	$query = "select id,handler_id,project_id,summary from $t_bug_table where status in (".implode(",", $t_rem_status).") and due_date<=$baseline and handler_id>0 ";
	if ( ON == $t_rem_ign_past ) {
			$query .=" and due_date>=$basenow" ;
	} else{
		if ( ON == $t_rem_ignore ) {
			$query .=" and due_date>1" ;
		}
	}
	$t_rem_include	= config_get('plugin_Reminder_reminder_include');
	$t_rem_projects	= "(";
	$t_rem_projects	.= config_get('plugin_Reminder_reminder_project_id');
	$t_rem_projects	.= ")";

	if (ON==$t_rem_include){
		if ($t_rem_projects <>"0") {
			$query .= " and $t_bug_table.project_id IN ". $t_rem_projects;
		}
	}else{
		$query .= " and $t_bug_table.project_id NOT IN ".$t_rem_projects;
	}
	
	if ( ON == $t_rem_group1 ) {
		$query .=" order by handler_id" ;
	} else {
		if ( ON == $t_rem_group2 ) {
			$query .=" order by $t_bug_table.project_id,handler_id" ;
		}
	}
	
	$results = db_query( $query );
	$resnum=db_num_rows($results);
	if ( OFF == $t_rem_group1 ) {
		if ($results) {
			while ($row1 = db_fetch_array($results)) {
				$id 		= $row1['id'];
				$handler	= $row1['handler_id'];
				$summary	= $row1['summary'];
				if ( OFF == $t_rem_details ) {
					$list = string_get_bug_view_url_with_fqdn( $id, $handler2 );			
				} else {
					$url = string_get_bug_view_url_with_fqdn( $id, $handler2 );
					$list = "  * $summary\n    $url\n";
				}
				$body  = $t_rem_body1;
				$body .= "\n\n";
				$body .= $list;
				$body .= "\n\n";
				$body .= $t_rem_body2;
				$result = email_group_reminder( $handler, $body );
				# Add reminder as bugnote if store reminders option is ON.
				if ( ON == $t_rem_store ) {
					$t_attr = '|'.$handler2.'|';
					bugnote_add( $id, $t_rem_body, 0, config_get( 'default_reminder_view_status' ) == VS_PRIVATE, REMINDER, $t_attr, NULL, FALSE );
				}
			}
		} 
	} else {
		if ($results){
			$start = true ;
			$list= "";
			// first group and store reminder per issue
			while ($row1 = db_fetch_array($results)) {
				$id 		= $row1['id'];
				$handler	= $row1['handler_id'];
				$project	= $row1['project_id'];
				$summary	= $row1['summary'];
				if ($start){
					$handler2 = $handler ;
					$start = false ;
				}
				if ($handler==$handler2){
					$list .="\n";
				if ( OFF == $t_rem_details ) {
					$list.= string_get_bug_view_url_with_fqdn( $id, $handler2 );			
				} else {
					$url = string_get_bug_view_url_with_fqdn( $id, $handler2 );
					$list.= "  * $summary\n    $url\n";
				}
					# Add reminder as bugnote if store reminders option is ON.
					if ( ON == $t_rem_store ) {
						$t_attr = '|'.$handler2.'|';
						bugnote_add( $id, $t_rem_body, 0, config_get( 'default_reminder_view_status' ) == VS_PRIVATE, REMINDER, $t_attr, NULL, FALSE );
					}
				} else {
					// now send the grouped email
					$body  = $t_rem_body1;
					$body .= "\n\n";
					$body .= $list;
					$body .= "\n\n";
					$body .= $t_rem_body2;
					$result = email_group_reminder( $handler2, $body);
					$handler2 = $handler ;
					$list ="\n";
				if ( OFF == $t_rem_details ) {
					$list = string_get_bug_view_url_with_fqdn( $id, $handler2 );			
				} else {
					$url = string_get_bug_view_url_with_fqdn( $id, $handler2 );
					$list = "  * $summary\n    $url\n";
				}
					# Add reminder as bugnote if store reminders option is ON.
					if ( ON == $t_rem_store ) {
						$t_attr = '|'.$handler2.'|';
						bugnote_add( $id, $t_rem_body, 0, config_get( 'default_reminder_view_status' ) == VS_PRIVATE, REMINDER, $t_attr, NULL, FALSE );
					}
				}
			}
			// handle last one
			if ($resnum>0){
				// now send the grouped email
				$body  = $t_rem_body1;
				$body .= "\n\n";
				$body .= $list;
				$body .= "\n\n";
				$body .= $t_rem_body2;
				$result = email_group_reminder( $handler2, $body);

			} 
			//
		}
	}
}

if ( ON == $t_rem_manager ) {
	// select relevant issues in combination with an assigned manager to the project
	$query  = "select id,handler_id,user_id,summary from $t_bug_table,$t_man_table where status in (".implode(",", $t_rem_status).") and due_date<=$baseline ";
		$query  = "select id,handler_id,user_id,summary from $t_bug_table,$t_man_table where status in (".implode(",", $t_rem_status).")  ";
	if ( ON == $t_rem_ign_past ) {
			$query .=" and due_date>=$basenow" ;
	} else{
		if ( ON == $t_rem_ignore ) {
			$query .=" and due_date>1" ;
		}
	}
	$t_rem_include	= config_get('plugin_Reminder_reminder_include');
	$t_rem_projects	= "(";
	$t_rem_projects	.= config_get('plugin_Reminder_reminder_project_id');
	$t_rem_projects	.= ")";
	if (ON==$t_rem_include){
		if ($t_rem_projects <>"0") {
			$query .= " and $t_bug_table.project_id IN ". $t_rem_projects;
		}
	} else {
		$query .= " and $t_bug_table.project_id NOT IN ".$t_rem_projects;
	}

	$query .=" and $t_bug_table.project_id=$t_man_table.project_id and $t_man_table.access_level=70" ;
	$query .=" order by $t_man_table.project_id,$t_man_table.user_id" ;

	$results = db_query( $query );
	$resnum=db_num_rows($results);
	if ($results){
		$start = true ;
		$list= "";
		// first group and store reminder per issue
		while ($row1 = db_fetch_array($results)) {
			$id 		= $row1['id'];
			$handler	= $row1['handler_id'];
			$manager	= $row1['user_id'];
			$summary= $row1['summary'];
			if ($start){
				$man2 = $manager ;
				$start = false ;
			}
			if ($manager==$man2){
				$list .=" \n\n";
				if ( OFF == $t_rem_details ) {
					$list.= string_get_bug_view_url_with_fqdn( $id, $handler2 );			
				} else {
					$url = string_get_bug_view_url_with_fqdn( $id, $handler2 );
					$list.= "  * $summary\n    $url\n";
				}
			} else {
				// now send the grouped email
				$body  = $t_rem_body1. " \n\n";
				$body .= $list. " \n\n";
				$body .= $t_rem_body2;
				$result = email_group_reminder( $man2, $body);
				$man2 = $manager ;
				if ( OFF == $t_rem_details ) {
					$list = string_get_bug_view_url_with_fqdn( $id, $man2 );			
				} else {
					$url = string_get_bug_view_url_with_fqdn( $id, $man2 );
					$list = "  * $summary\n    $url\n";
				}				$list .= " \n\n";
			}
		}
		// handle last one
		if ($resnum>0){
			// now send the grouped email
			$body  = $t_rem_body1. " \n\n";
			$body .= $list. " \n\n";
			$body .= $t_rem_body2;
			$result = email_group_reminder( $man2, $body);

		} 
		//
	} 
}


# Send Grouped reminder
function email_group_reminder( $p_user_id, $issues ) {
	$t_username = user_get_field( $p_user_id, 'username' );
	$t_email = user_get_email( $p_user_id );
	$t_subject = config_get( 'plugin_Reminder_reminder_group_subject' );
	$t_message = $issues ;
	if( !is_blank( $t_email ) ) {
		email_store( $t_email, $t_subject, $t_message );
		if( OFF == config_get( 'email_send_using_cronjob' ) ) {
			email_send_all();
		}
	}
}
bug_reminder_mail.php (9,023 bytes)   
cas

cas

2018-08-31 12:20

manager   ~0060581

Updated German translation and removed final <br> tags

cas

cas

2018-08-31 12:24

manager   ~0060582

Fixed the date issue for you also in 2.13

Reminder213.zip (22,749 bytes)
FA-jka

FA-jka

2018-09-03 04:47

reporter   ~0060589

Dear cas - this is a perfect result and i would really thank you for your patience and your support (i know that my english is more worse than my php knowledge).

If there is anythink i can do to support this add-on - let me know!

Matthias79

Matthias79

2018-10-01 09:18

reporter   ~0060717

Last edited: 2018-10-01 09:56

View 3 revisions

Dear Cas,
i have testet your plugin. It works so far. But if i hit the button that refer to : "/mantis/plugin.php?page=Reminder/bug_due_overview.php" i got this exception:


APPLICATION ERROR 0000401

Datenbankabfrage fehlgeschlagen. Die Reportmeldung lautet #1054: Unknown column 'Array' in 'where clause' für die Abfrage: 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 (Array) and due_date>1 and due_date<=1538562422 and mantis_bug_table.project_id IN (136).

Bitte benutzen Sie die „Zurück“-Taste Ihres Browsers, um auf die vorhergehende Seite zurückzukehren. Dort können Sie den hier angezeigten Eintrag korrigieren oder eine andere Aktion ausführen. Über das Menü können Sie auch direkt zu einer anderen Aktion wechseln.


the script : "http://XXXXXXX/mantis/plugins/Reminder/scripts/bug_feedback_mail_test.php&quot; works fine.

thanks for your support.

Matthias

Settings1.PNG (24,202 bytes)   
Settings1.PNG (24,202 bytes)   
Settings2.PNG (81,747 bytes)   
Settings2.PNG (81,747 bytes)   
cas

cas

2018-10-09 10:22

manager   ~0060765

Can you try it once again after selecting multiple statusses in the config page?

Matthias79

Matthias79

2018-10-10 06:30

reporter   ~0060771

Last edited: 2018-10-10 06:30

View 3 revisions

Dear CAS,
thank you for your replay.

I had marked all statuses, but it dosn't help.
This is the Error Message:

APPLICATION ERROR 0000401

Database query failed. Error received from database was #1054: Unknown column 'Array' in 'where clause' 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 (Array) and due_date>1 and due_date<=1539326343 and mantis_bug_table.project_id NOT IN (0).

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.


Attached my config

Have a nice day.

Matthias

Mantis.PNG (73,387 bytes)   
Mantis.PNG (73,387 bytes)   
cas

cas

2018-10-10 10:49

manager   ~0060772

Hi Matthias,
can you check the actual value with phpmyadmin of the variable "plugin_Reminder_reminder_bug_status"
This is stored in the mantis_config_table.

Matthias79

Matthias79

2018-10-11 03:34

reporter   ~0060774

Hi Cas,
thew value is 50.
Attached all values from this table.

Thank you for your support.

Mantis-2.PNG (127,069 bytes)   
Mantis-2.PNG (127,069 bytes)   
cas

cas

2018-10-11 05:06

manager   ~0060775

Matthias,
I am a bit puzzled here since you selected all values in your previous printscreen.
Now in the database, you only have one value.
Can you open bug_due_overview.php with an editor, go to line 30 and remove "#".
Place the "#" in the beginning of line 31 so it looks like :
$query="select $t_bug_table.id,summary,due_date,username,realname from $t_bug_table,$t_user_table where $t_bug_table.handler_id=$t_user_table.id and status=$t_rem_status and due_date>1 and due_date<=$baseline" ;

$query="select $t_bug_table.id,summary,due_date,username,realname from $t_bug_table,$t_user_table where $t_bug_table.handler_id=$t_user_table.id and status in ($t_rem_status) and due_date>1 and due_date<=$baseline" ;

Now try again.

Matthias79

Matthias79

2018-10-11 07:05

reporter   ~0060776

Hi cas,
sorry, i had made the selecting multiple statusses after testing revert.

Now i have selecting all options.

I have changes the '#' to Line 31 and tried again ( with multiple statusses )
This is the result:

APPLICATION ERROR 0000401

Database query failed. Error received from database was #1054: Unknown column 'Array' in 'where clause' 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=Array and due_date>1 and due_date<=1539428650 and mantis_bug_table.project_id NOT IN (0).

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.

Attached the Printscreen from the PHPAdmin Table with multiple statusses and the Plugin Settings

Unbenannt.PNG (131,582 bytes)   
Unbenannt.PNG (131,582 bytes)   
Unbenannt2.PNG (70,535 bytes)   
Unbenannt2.PNG (70,535 bytes)   
cas

cas

2018-10-11 07:28

manager   ~0060777

Sorry, for this test, you should only use one(1) status.

Matthias79

Matthias79

2018-10-11 07:57

reporter   ~0060778

No problem,
now i tried the test ( # at Line 31 ) with 1 Status

This is the Result:

PPLICATION ERROR 0000401

Database query failed. Error received from database was #1054: Unknown column 'Array' in 'where clause' 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=Array and due_date>1 and due_date<=1539431826 and mantis_bug_table.project_id NOT IN (0).

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

2018-10-11 08:14

manager   ~0060779

I have not been able to reproduce your error but we should find a way
Final test ( I hope):
make line 30 look like:
$query="select $t_bug_table.id,summary,due_date,username,realname from $t_bug_table,$t_user_table where $t_bug_table.handler_id=$t_user_table.id and status=50 and due_date>1 and due_date<=$baseline" ;

Matthias79

Matthias79

2018-10-11 08:31

reporter   ~0060780

Last edited: 2018-10-11 08:56

View 2 revisions

Hi, cas.

that works !!!

Can you tell me the different ?

thank you Matthias

cas

cas

2018-10-11 09:19

manager   ~0060781

It works but it is not fixed yet. What I did is hard-coded status 50 which made it work. It work normally with an array of values which on your setup fails.
Let's have one more go, make line 30 like this :
$query="select $t_bug_table.id,summary,due_date,username,realname from $t_bug_table,$t_user_table where $t_bug_table.handler_id=$t_user_table.id and status in (".implode(",", $t_rem_status).") and due_date>1 and due_date<=$baseline" ;

Matthias79

Matthias79

2018-10-11 09:38

reporter   ~0060782

That works also !

cas

cas

2018-10-11 09:47

manager   ~0060783

Then it looks like it is fixed. You can do one more test selecting more than one status.
If it then still works, we can close this issue.

Matthias79

Matthias79

2018-10-11 10:01

reporter   ~0060784

I have tried it with all issues.
It works. thank you !!!

Have a nice day.
Matthias

1800548

1800548

2019-01-18 02:35

reporter   ~0061249

Last edited: 2019-01-19 01:41

View 3 revisions

Hello,
I have meet some problems when using "cron" to schedule the task-there aren't have mail send. (I use bitnami)
I can execute bug_reminder_mail.php with command "php bug_reminder_mail.php", and I have test the using of cron before, it also can work,
but when I add "$g _email_send_using_cronjob = ON;", it will not send mail, even if I use php command above to run bug_reminder.
Did I neglect any step or any config to use cron? Wish anyone can answer for me.

p.s. bug_feedback_mail.php can be work in cron, without adding "$g _email_send_using_cronjob = ON;".
Thank you.
Ray

1800548

1800548

2019-01-19 02:21

reporter   ~0061251

Thank you, I found the problem.
The problem seems like "../../../core.php" can't use in cron job.
The solution is changed the core.php location to absolute path, and it can work in cron now.

Sorry for disturbance.

1800548

1800548

2019-03-04 04:56

reporter   ~0061617

Excuse me,
I want to ask if Reminder-Plugin can combine with custom field's date or not?
(To have remind many times in one issue.)

cas

cas

2019-03-04 09:16

manager   ~0061620

@1800548, no it does not work with a custom date-field. Then it would require a change to the plugin.

1800548

1800548

2019-03-07 18:52

reporter   ~0061648

Ok, thank you for your reply!

keessonnema

keessonnema

2019-03-19 09:05

reporter   ~0061710

I find it extremely curious how this is released to the public.

I have a few things that are broken:

  • helper_alternate_class() throws an error and thus breaks the page.
  • The query in bug_feedback_mail.php breaks in mysql strict mode (unbelievable that this is not taken care of before releasing).
  • Why is the project selectbox replaced by an input field in settings? How can one find a project id without looking in the url or in the database.
  • There are no code standards applied, so the code is hard to read.
cas

cas

2019-03-19 12:17

manager   ~0061713

Beste Kees, ik zie jouw correcties graag tegemoet.
This was released given the need for such plugin. It is working not just on my end but for many people. We are open for improvements. Please share these rather then a list of comments without evidence.
Which error popps up?
Which query gives an issue, include error
Project selection, fair point, I think just being lazy.
When I had the need for this, I did not worry about standards, just needed the functionality( same for you I suppose).
Feel free to takeover the plugin and take care of all these issues, there is no cost for that�

keessonnema

keessonnema

2019-03-19 16:31

reporter   ~0061718

Cas, thanks for your reply!
I was wondering. Could you update the github repo with the latest version? This way I can contribute easier.

For our needs we only use the Feedback reminder. I actually started on my own plugin (feedback reminder functionality only) today (with some credits to yours). If you want me to re-do / fix your plugin I could figure something out. Would be helpful if it's all up-to-date on the github repo though. It's nice we have something to work on as a base (which fortunality works for most people as you said).

cas

cas

2019-03-20 06:06

manager   ~0061722

Kees,
I will update Github when I am back from business trip ( will be next week Tuesday earliest).
Best option is to transform this plugin to a fully compliant module, makes sense to me.
That way we can keep the flexability by not restricting to just Feedback.

keessonnema

keessonnema

2019-03-20 06:34

reporter   ~0061724

That's fine. I'll create the feedback plugin for own use in any case, but I'm looking forward to the updated github repo.

kchaitu4

kchaitu4

2019-09-04 10:48

reporter   ~0062726

Hello, I have installed reminder 2.0 from the github location: https://github.com/mantisbt-plugins/Reminder. When I try to install, I dont find install button instead I see that the dependency is not met. How to fix this issue?
Mantis Version: 2.21.0

Thanks in Advance,
Krishna

mantis-3.PNG (29,933 bytes)   
mantis-3.PNG (29,933 bytes)   
kchaitu4

kchaitu4

2019-09-05 05:27

reporter   ~0062731

Hello, I have updated the reminder version 2.13 and was able to install it and configure. I have also setup the cronjob, but I am not receiving any reminder emails. I get emails for creating and other regular notification emails. Please help!.

Thanks,
Krishna

Issue History

Date Modified Username Field Change
2018-08-28 08:49 cas New Issue
2018-08-28 08:49 cas Status new => assigned
2018-08-28 08:49 cas Assigned To => cas
2018-08-28 08:49 cas File Added: Reminder206.zip
2018-08-30 08:20 cas File Added: Reminder210.zip
2018-08-30 08:20 cas Note Added: 0060547
2018-08-30 08:20 cas Summary Reminder plugion Version 2.06 has been released for testing => Reminder plugin Version 2.10 has been released for testing
2018-08-30 08:20 cas File Deleted: Reminder206.zip
2018-08-30 10:05 cas File Added: Reminder211.zip
2018-08-30 10:05 cas Note Added: 0060553
2018-08-30 10:06 cas Summary Reminder plugin Version 2.10 has been released for testing => Reminder plugin Version 2.11 has been released for testing
2018-08-30 10:06 cas File Deleted: Reminder210.zip
2018-08-31 05:13 FA-jka Note Added: 0060568
2018-08-31 09:31 cas Note Added: 0060571
2018-08-31 10:35 cas Summary Reminder plugin Version 2.11 has been released for testing => Reminder plugin Version 2.12 has been released for testing
2018-08-31 10:38 FA-jka Note Added: 0060574
2018-08-31 10:38 cas File Added: Reminder212.zip
2018-08-31 10:38 cas Note Added: 0060575
2018-08-31 10:38 FA-jka Note Added: 0060576
2018-08-31 10:38 cas File Deleted: Reminder211.zip
2018-08-31 10:50 FA-jka Note Added: 0060577
2018-08-31 10:51 cas File Added: details.JPG
2018-08-31 10:51 cas Note Added: 0060578
2018-08-31 10:56 cas File Added: Reminder212-2.zip
2018-08-31 10:56 cas Note Added: 0060579
2018-08-31 10:56 cas File Deleted: Reminder212.zip
2018-08-31 11:36 FA-jka File Added: strings_german.txt
2018-08-31 11:36 FA-jka File Added: bug_reminder_mail.php
2018-08-31 11:36 FA-jka Note Added: 0060580
2018-08-31 12:20 cas File Added: Reminder213.zip
2018-08-31 12:20 cas Note Added: 0060581
2018-08-31 12:21 cas Summary Reminder plugin Version 2.12 has been released for testing => Reminder plugin Version 2.13 has been released
2018-08-31 12:23 cas File Deleted: Reminder213.zip
2018-08-31 12:24 cas File Added: Reminder213.zip
2018-08-31 12:24 cas Note Added: 0060582
2018-09-03 04:47 FA-jka Note Added: 0060589
2018-10-01 09:18 Matthias79 File Added: Settings1.PNG
2018-10-01 09:18 Matthias79 File Added: Settings2.PNG
2018-10-01 09:18 Matthias79 Note Added: 0060717
2018-10-01 09:19 Matthias79 Note Edited: 0060717 View Revisions
2018-10-01 09:56 Matthias79 Note Edited: 0060717 View Revisions
2018-10-09 10:22 cas Note Added: 0060765
2018-10-10 06:30 Matthias79 File Added: Mantis.PNG
2018-10-10 06:30 Matthias79 Note Added: 0060771
2018-10-10 06:30 Matthias79 Note Edited: 0060771 View Revisions
2018-10-10 06:30 Matthias79 Note Edited: 0060771 View Revisions
2018-10-10 10:49 cas Note Added: 0060772
2018-10-11 03:34 Matthias79 File Added: Mantis-2.PNG
2018-10-11 03:34 Matthias79 Note Added: 0060774
2018-10-11 05:06 cas Note Added: 0060775
2018-10-11 07:05 Matthias79 File Added: Unbenannt.PNG
2018-10-11 07:05 Matthias79 File Added: Unbenannt2.PNG
2018-10-11 07:05 Matthias79 Note Added: 0060776
2018-10-11 07:28 cas Note Added: 0060777
2018-10-11 07:57 Matthias79 Note Added: 0060778
2018-10-11 08:14 cas Note Added: 0060779
2018-10-11 08:31 Matthias79 Note Added: 0060780
2018-10-11 08:56 Matthias79 Note Edited: 0060780 View Revisions
2018-10-11 09:19 cas Note Added: 0060781
2018-10-11 09:38 Matthias79 Note Added: 0060782
2018-10-11 09:47 cas Note Added: 0060783
2018-10-11 10:01 Matthias79 Note Added: 0060784
2019-01-18 02:35 1800548 Note Added: 0061249
2019-01-18 20:23 1800548 Note Edited: 0061249 View Revisions
2019-01-19 01:41 1800548 Note Edited: 0061249 View Revisions
2019-01-19 02:21 1800548 Note Added: 0061251
2019-03-04 04:56 1800548 Note Added: 0061617
2019-03-04 09:16 cas Note Added: 0061620
2019-03-07 18:52 1800548 Note Added: 0061648
2019-03-19 09:05 keessonnema Note Added: 0061710
2019-03-19 12:17 cas Note Added: 0061713
2019-03-19 16:31 keessonnema Note Added: 0061718
2019-03-20 06:06 cas Note Added: 0061722
2019-03-20 06:34 keessonnema Note Added: 0061724
2019-09-04 10:48 kchaitu4 File Added: mantis-3.PNG
2019-09-04 10:48 kchaitu4 Note Added: 0062726
2019-09-05 05:27 kchaitu4 Note Added: 0062731