From 75156912e1746e9b79b920632dced0446a78afef Mon Sep 17 00:00:00 2001 From: CasN Date: Mon, 13 Jan 2025 18:09:08 +0100 Subject: [PATCH] Version 2.30 release Added option to show details in grouped emails --- README.md | 9 +- README.txt | 182 ---------------------------------- Reminder.php | 4 +- scripts/bug_reminder_mail.php | 19 +++- version.txt | 2 +- 5 files changed, 25 insertions(+), 191 deletions(-) delete mode 100644 README.txt diff --git a/README.md b/README.md index 62749c7..6e0e136 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Reminder Plugin -Copyright (c) 2009 - 2024 Cas Nuy - cas@nuy.info - http://www.nuy.info +Copyright (c) 2009 - 2025 Cas Nuy - cas@nuy.info - http://www.nuy.info Released under the [GPL 2.0](http://opensource.org/licenses/GPL-2.0) @@ -44,8 +44,10 @@ No Mantis scripts or tables are being altered. ## Configuration options +... +// Provide more detail with grouped emails +reminder_details = ON; #applicable for reminder-emails -``` // What is the body of the E-mail reminder_mail_subject = "Following issue will be Due shortly"; @@ -179,4 +181,5 @@ Source code is also available on [Github](https://github.com/mantisbt-plugins/Re ## Credits -- Mark Ziegler, German translation (May 2010) +- Mark Ziegler German translation May-2010
+- Lukas Francalek Czech translation June-2023
diff --git a/README.txt b/README.txt deleted file mode 100644 index c581a77..0000000 --- a/README.txt +++ /dev/null @@ -1,182 +0,0 @@ -******************************************************************************** -* Introduction * -******************************************************************************** - -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 1.2.x of mantis and should be installed as -any other plugin. No Mantis scripts or tables are being altered. - - -******************************************************************************** -* Installation * -******************************************************************************** - -Like any other plugin. -After copying to your webserver : -- Start mantis ad administrator -- Select manage -- Select manage Plugins -- Select Install behind Reminder 2.22 -- Once installed, click on the plugin-name for further configuration. - -For version 1.2.1 make sure to have this statement in confg_inc.php: -$g_path = 'http://path to your mantis installation/'; - - -******************************************************************************** -* Configuration options * -******************************************************************************** - -// What is the body of the E-mail -reminder_mail_subject = "Following issue will be Due shortly"; - -// What is the subject of the grouped E-mail -reminder_group_subject = "You have issues approaching their Due Date"; - -// What is the start of the body of the grouped E-mail -reminder_groupbody1 = "Please review the following issues"; - -// What is the end of the body of the grouped E-mail -reminder_groupbody2 = "Please do not reply to this message"; - -// perform for which project -reminder_project_id = '0'; means ALL -// you can define ultipleproject-id's separated by comma - -// include or exclude project -reminder_include = ON; means Projects defined above are include - -// how many days before Due date should we take into account -reminder_days_treshold = 2; - -// Should we use hours instead of days -reminder_hours = OFF; - -// Should we store this reminder as bugnote -reminder_store_as_note = OFF; -// only possible for handler - -// For which status to send reminders -reminder_bug_status = ASSIGNED - -// Ignore reminders for issues with no Due date set -reminder_ignore_unset = ON - -// Ignore reminders for issues with Due dates in the past -reminder_ign_past = ON - -// only valid for the mail function, downloads will always have duedates that have gone by - -// Create overview per handler -reminder_handler = ON - -// Group issues by Handler -reminder_group_issues = ON - -// Group issues by project/handler -reminder_group_project = OFF - -// Create overview per manager/project -reminder_manager_overview = ON -// -// access level for manager= 70 -// this needs to be made flexible -// we will only produce overview for those projects that have a separate manager -// - -// Select project to receive Feedback mail -reminder_feedback_project = 0; means ALL - -// For which status to send feedbackreminders -reminder_bug_status = FEEDBACK - - -******************************************************************************** -* Automatically generating mail * -******************************************************************************** - -After this, bug_reminder_mail can be used via cron like this: -*/1440 * * * * lynx --dump http://mantis.homepage.com/plugins/Reminder/scripts/bug_reminder_mail.php - -or via command line interface -*/1440 * * * * /usr/local/bin/php /path/to/mantis/plugins/Reminder/scripts/bug_reminder_mail.php - -This line would send out a reminder every day. - -You also can use a scheduled task under windows by calling a batch-file like: - -REM *** this batch is running as a scheduled task under the ... Account *** -g: -cd \inetpub\wwwroot\mantis -php.exe plugins/Reminder/scripts/bug_reminder_mail.php - - -One can also schedule a job to prompt reporters to respond because their -issue has status Feedback. In that case replace bug_reminder_mail.php with -bug_feedback_mail.php - - -******************************************************************************** -* Extras * -******************************************************************************** - -On top of that, I have created a little variant which will create a -spreadsheet with issues getting due. Call script like: - -http://www.YourMantisHome.com/plugins/Reminder/scripts/bug_due_overview2.php?days=2&status=50 - -If you do not apply parameters, the script will default to the above. - -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. In case of a blank screen, all is processed normally. - -For option Days/Hours, the script will fetch the plugin definition. - - -******************************************************************************** -* License * -******************************************************************************** - -This plugin is distributed under the same conditions as Mantis itself (GPL). - - -******************************************************************************** -* Bug reporting * -******************************************************************************** - -Main issue: http://www.mantisbt.org/bugs/view.php?id=10153 - -Log new issues against the [Plugin - Reminder] project on mantisbt.org's tracker: -http://www.mantisbt.org/bugs/view_all_bug_page.php?project_id=7 - -This code is available on github: https://github.com/mantisbt-plugins/Reminder - - -******************************************************************************** -* Thanks * -******************************************************************************** - -Mark Ziegler German translation May 2010 -Lukas Francalek Czech translation June 2023 - -******************************************************************************** -* Greetings * -******************************************************************************** - -Cas Nuy -cas@nuy.info -http://www.nuy.info diff --git a/Reminder.php b/Reminder.php index 685b494..469c496 100644 --- a/Reminder.php +++ b/Reminder.php @@ -4,7 +4,7 @@ class ReminderPlugin extends MantisPlugin { function register() { $this->name = 'Reminder'; $this->description = lang_get( 'reminder_plugin_desc' ); - $this->version = '2.24'; + $this->version = '2.30'; $this->requires = array('MantisCore' => '2.0.0',); $this->author = 'Cas Nuy'; $this->contact = 'Cas-at-nuy.info'; @@ -37,7 +37,7 @@ function config() { 'reminder_finished' => 'Finished processing your selection', 'reminder_hours' => OFF, 'reminder_colsep' => ';', - 'reminder_details' => OFF, + 'reminder_details' => ON, ); } diff --git a/scripts/bug_reminder_mail.php b/scripts/bug_reminder_mail.php index 9c66b5c..30ddbde 100644 --- a/scripts/bug_reminder_mail.php +++ b/scripts/bug_reminder_mail.php @@ -35,6 +35,7 @@ } else{ $multiply=1; } +$t_details = plugin_config_get( 'reminder_details' ); // // access level for manager= 70 // this needs to be made flexible @@ -79,7 +80,11 @@ while ($row1 = db_fetch_array($results)) { $id = $row1['id']; $handler = $row1['handler_id']; - $list = string_get_bug_view_url_with_fqdn( $id, $handler2 ); + if ( ON == $t_details ) { + $list = formatBugEntry($row1); + } else { + $list = string_get_bug_view_url_with_fqdn( $id, $handler2 ); + } $body = $t_rem_body1. " \n\n"; $body .= $list. " \n\n"; $body .= $t_rem_body2; @@ -177,7 +182,11 @@ } if ($manager==$man2){ $list .=" \n\n"; - $list .= string_get_bug_view_url_with_fqdn( $id, $man2 ); + if ( ON == $t_details ) { + $list = formatBugEntry($row1); + } else { + $list = string_get_bug_view_url_with_fqdn( $id, $man2 ); + } } else { // now send the grouped email $body = $t_rem_body1. " \n\n"; @@ -185,7 +194,11 @@ $body .= $t_rem_body2; $result = email_group_reminder( $man2, $body); $man2 = $manager ; - $list= string_get_bug_view_url_with_fqdn( $id, $man2 ); + if ( ON == $t_details ) { + $list = formatBugEntry($row1); + } else { + $list = string_get_bug_view_url_with_fqdn( $id, $man2 ); + } $list .= " \n\n"; } } diff --git a/version.txt b/version.txt index 0947f1f..a97faaa 100644 --- a/version.txt +++ b/version.txt @@ -1,3 +1,3 @@ -Version: 2.23 # +Version: 2.30 # Devurl: https://github.com/mantisbt-plugins/Reminder/blob/master/version.txt # Location: https://github.com/mantisbt-plugins/Reminder/archive/refs/heads/main.zip #