-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding In-Reply-To header to bugnote notification email #1867
Conversation
0e7342b
to
512f9ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. Looking good but have not had time to actually test it yet. Just a few minor comments...
core/email_api.php
Outdated
@@ -1044,7 +1056,11 @@ function email_bugnote_add( $p_bugnote_id, $p_files = array(), $p_exclude_user_i | |||
|
|||
$t_contents = $t_message . "\n"; | |||
|
|||
email_store( $t_user_email, $t_subject, $t_contents ); | |||
$t_mail_headers = [ | |||
'In-Reply-To' => $t_message_md5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use of a variable is not necessary here, just call the function from the array declaration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I was not clear enough here. I meant that the $t_message_md5
variable (declared line 1015) was not necessary. I'll fix it.
I have added a commit about the requested changes. |
Prevents start of a new thread/conversation in mail clients. Fixes #32038, PR #1867 Co-authored-by: Damien Regad <dregad@mantisbt.org>
Fixed in fd4b1c5 |
Thanks @sederther |
* Support including access levels for project users Fixes #22791 * Add API to get project users with a certain access level or above. If no access level specified, get all users that can access the project. Fixes #22791 * Fix query parameters modeled as options + soap fixes 1. Query params should be modeled as query not option. 2. Remove pagination for SOAP API. 3. Use id instead of project_id for project_id. 4. Fix SOAP to return array of users. Fixes #22791 * Verify that user has access to project A user that doesn't have VIEWER access to a project, shouldn't be able to query its users. Fixes #22791 * phpdoc improvements Fixes #22791 * Apply PR review comments 1. Remove redundant check. 2. Refactor functions that get project users to use helper function. 3. Fix warnings when user preference for language is set to auto. ixes #22791 * Update Postman Collection Fixes #30908 * Remove expansion of token / url env variables from docs Fixes #30908 * Improvements to sample responses + minor fixes Fixes #30908 * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Allow copy of categories excluding inherited ones Add a new checkbox next to the Copy to/from buttons on Manage Project Page, allowing user to decide whether the copy operation should be restricted to the source project's "local" categories, excluding the global ones as well as those inherited from the parent project(s). Fixes #30812 * Markdown. external css to style the quotings. Fix Indention. Tabs, not spaces. Fix Indention. Tabs, not spaces. * Remove no longer needed test. * Load stylesheet only if Markdown is enabled. * Change css font-size from static to inherit. * Remove restrictive CSS selectors. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * fix typo in api.postman_collection.json * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Fix static analysis warnings in LDAP API * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Fix PHP 8.1 deprecation notice in config_can_delete() DEPRECATED: 'strtolower(): Passing null to parameter #1 ($string) of type string is deprecated' in ./core/config_api.php' line 451 Fixes #31712 * Fix PHP 8.1 deprecation notice in adm_config_page.php DEPRECATED: 'preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated' in ./core/string_api.php' line 570 Fixes #31712 * Avoid unnecessary repeated string_display_line() calls * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Add canonical meta tag to view issue page It is possible for issue URLs to have additional parameters in some situations. Search engines such as Google will index better if they know which are the set of canonical URLs. It reduces load through over-indexing, allows the search engine to prioritise the indexing of URLs that are correct, and avoids extraneous or non-ideal URLs getting into the index. Fixes #31833, PR mantisbt#1862 * Bump ezyang/htmlpurifier from 4.14.0 to 4.16.0 Bumps [ezyang/htmlpurifier](https://github.com/ezyang/htmlpurifier) from 4.14.0 to 4.16.0. - [Release notes](https://github.com/ezyang/htmlpurifier/releases) - [Changelog](https://github.com/ezyang/htmlpurifier/blob/master/CHANGELOG.md) - [Commits](ezyang/htmlpurifier@v4.14.0...v4.16.0) --- updated-dependencies: - dependency-name: ezyang/htmlpurifier dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump phpmailer/phpmailer from 6.6.4 to 6.7.1 Bumps [phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer) from 6.6.4 to 6.7.1. - [Release notes](https://github.com/PHPMailer/PHPMailer/releases) - [Changelog](https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md) - [Commits](PHPMailer/PHPMailer@v6.6.4...v6.7.1) --- updated-dependencies: - dependency-name: phpmailer/phpmailer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Fixes #29025, PR mantisbt#1858 * Composer update - Upgrading guzzlehttp/promises (1.4.0 => 1.5.2) * Revert changes to api/rest/index.php This is a partial revert of bfd2843. The updated index.php belongs to a work-in-progress upgrade of Slim Framework from v3 t v4, and should not have been committed. * Fix undefined variable warnings in XML plugin When importing issues with bugnotes where the bugnote node does not contain all the possible fields, Mantis issues an Undefined property warning. This sets a default value for missing non-required fields to prevent this. Fixes #31876 * Localisation updates from https://translatewiki.net. * Fix static analysis warnings * Minor performance optimization Since we know the user ID, pass it to access_has_bug_level() to avoid an extra auth_get_current_user_id() call. * Fix FilterTest::testGetIssuesForUserForUnassignedNoTargetUser The test case incorrectly failed when executed against a database containing one or more unassigned sticky issues. This is because filter_get_bug_rows() returns data sorted with sticky issues first, and the test case made a bad assumption that the issue created for the test case will be at index 0. * Whitespace * Fix static analysis warnings * Markdown: simplify table processing Overriding Parsedown's element() method which gives access to all marked elements makes it easy to change the properties/attributes of an element just before it is converted into HTML markup. This addresses steps 2 and 3 (cleanup tables and tests) of issue #30919. Merge PR mantisbt#1848 Co-authored-by: grummbeer <kde@streber24.de> Co-authored-by: Damien Regad <dregad@mantisbt.org> * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Dockerfile to build documentation with Publican Publican is an ageing tool that is no longer developed or supported, and difficult to install under non-Linux-based platforms. Using a Docker container makes it possible to easily build the MantisBT documentation without having to install a complex toolchain. See usage instructions inside the dockerfile. Fixes #31993 * New EVENT_UPDATE_BUG_SHOW_CUSTOM_FIELD The Event is triggered in bug_change_status_page.php, allowing a plugin to control which custom field is shown. Fixes #31666, PR mantisbt#1859 Co-authored-by: msw <martin.schwarz@ibak.de> Co-authored-by: Damien Regad <dregad@mantisbt.org> * Add "User" section to Management Events reference * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * CSS cleanup - Fix static analysis warnings - Whitespace - Remove obsolete browser-specific `-XX-transform` and `-XX-transition` attributes * Fix static analysis warnings * Use variable to avoid repeated config_get() calls * Use class constant for Session key prefix * Code cleanup - Fix static analysis warnings - Whitespace - PHPDoc * Localisation updates from https://translatewiki.net. * ProjectTest: dynamically generate project names Avoids errors caused by existing projects when the unit tests are run against an existing database. * ProjectTest code cleanup * Rename $t_initial_issues -> $t_issues_before * Rename $t_issues_count/$t_project_issues -> $t_issues_after * getIssueToAdd() with default Summary Until now, each test case needing to create an Issue passed its method name (hardcodec) to getIssueToAdd() for it to generate a specific Summary. getIssueToAdd() now builds the Summary dynamically from the Class name and the TestCase::getName() method, with an optional suffix and a random number as before. * Whitespace * Remove unused, commented-out code * Replace assertEquals by more specialized assertions * Skip FilterTests if there are too many issues Some tests can't be completed if there are more Issues in the database than the maximum number to retrieve (defined in ISSUES_TO_RETRIEVE constant), because they compare the number of Issues before/after executing the test, and both lists contain ISSUES_TO_RETRIEVE Issues. Mark the test case as skipped if getAllProjectsIssues() or getAllProjectsIssueHeaders() return ISSUES_TO_RETRIEVE or more Issues. Fixes #17121 * Code cleanup Use null-coalescing operator to avoid array_key_exists() / isset() calls * New bootstrap variable MANTIS_TESTSUITE_MAX_ISSUES This replaces the FilterTest::ISSUES_TO_RETRIEVE constant, allowing a developer to adjust the number of issues to retrieve when executing FilterTest cases. This avoids skipped tests when using a local database with more Issues than the default of 50 (which works fine for TravisCI tests, that start with an empty DB). This is a follow-up fix for Issue #17121. * Use UTC as default timezone in sample bootstrap * Remove ob_start() from TestConfig Not sure why output buffering was enabled in the first place - the Soap test suite seems to run just fine without it. Use benefits from the unbuffered output, as they can see the progress of tests execution. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Adding In-Reply-To header to bugnote notification Prevents start of a new thread/conversation in mail clients. Fixes #32038, PR mantisbt#1867 Co-authored-by: Damien Regad <dregad@mantisbt.org> * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Improve documentation for custom_strings_inc.php - New section for file format (admin.customize.strings.format) - Add warning not to use core functions (see issue #32042) - General review of admin.customize.strings section: minor text and formatting changes * Localisation updates from https://translatewiki.net. * Prevent recursion when signaling EVENT_LOG event If a plugin hooked on EVENT_LOG calls log_event() directly or indirectly and the log level settings include the level for the event being logged, MantisBT enters in an endless recursion loop. Using a static variable to prevent recursion if EVENT_LOG has already been signaled prevents this. Fixes #32243 Fixes mantisbt-plugins/EventLog#3 * Localisation updates from https://translatewiki.net. * Add UserCreateTokenCommand Fixes #32245 * Add REST API for creating user tokens Fixes #32245 * Update Web UI to use UserCreateTokenCommand Fixes #32245 * Deleting user now deletes associated API tokens Fixes #32246 * Rename create API token command and use config date format Fixes #32245 * Add UserTokenDeleteCommand Fixes #32247 * Update Web UI to use UserTokenDeleteCommand Fixes #32247 * Update REST API to use UserTokenDeleteCommand Fixes #32247 * Block creation of tokens for users with higher access level Fixes #32245 * Remove unused variable Fixes #32245 * Use impersonate access level to create/delete API tokens Fixes #32245 * Better handling for tokens relating to a user that doesn't exist Fixes #32245 * Clarify user_id vs. token_id in API router naming Fixes #32245 * Fixes to error messages Fixes #32245 * Localisation updates from https://translatewiki.net. * Localisation updates from https://translatewiki.net. * Remove trailing commas for PHP 7 compatibility Fixes #32247 * Bump phpmailer/phpmailer from 6.7.1 to 6.8.0 Bumps [phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer) from 6.7.1 to 6.8.0. - [Release notes](https://github.com/PHPMailer/PHPMailer/releases) - [Changelog](https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md) - [Commits](PHPMailer/PHPMailer@v6.7.1...v6.8.0) --- updated-dependencies: - dependency-name: phpmailer/phpmailer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Fix performance with viewing large issues Fixes #32244 * Remove unnecessary queries No need to query issue id from issue note id, since we already have it. Fixes #32244 * Implement ConfigsSetCommand Fixes #32258 * Add REST API for setting configs Fixes #32258 * Support setting enum configs via array of objects In addition to support setting enum strings in the formation used in config_inc file, The API now supports the same format that get config returns for enums, which is an array of objects, each containing and id and a name property. Note that the label field returns by get configs API, is not supported in set configs. Fixes #32258 * Expect config option names in 'option' to match get configs Fixes #32258 * Use 'set_configuration_threshold' for set config access check Fixes #32258 * Update Web UI to use command for config add, clone, and edit Fixes #32258 * Update Web UI to use command for config delete Fixes #32258 * Remove trailing commas to improve PHP 7 compatibility Fixes #32258 * Implement ProjectAddCommand Fixes #32231 * Implement ProjectDeleteCommand Fixes #32232 * Change Web UI to use ProjectAddCommand Fixes #32231 * Change Web UI to use ProjectDeleteCommand Fixes #32232 * Trigger EVENT_MANAGE_PROJECT_CREATE from command * Trigger EVENT_MANAGE_PROJECT_DELETE from command * Change REST API to use ProjectAddCommand Fixes #32231 * Update SOAP API to use ProjectAddCommand Fixes #32231 * Override current project id in ProjectAddCommand Fixes #32231 * Override current project id in ProjectDeleteCommand Fixes #32232 * Update SOAP API to use ProjectDeleteCommand Fixes #32232 * Implement ProjectUpdateCommand Fixes #32238 * Update Web UI to use ProjectUpdateCommand Fixes #32238 * Updates to ProjectUpdateCommand Fixes #32238 * Return inherit_global in project info in REST API * Update REST API to use ProjectUpdateCommand Fixes #32238 * Update SOAP API to use ProjectUpdateCommand Fixes #32238 * Be more specific about add project REST API response Fixes #32231 * Fix for Project SOAP APIs Fixes #32231 Fixes #32232 Fixes #32238 * Fix Get Project REST API when user doesn't have access Return 404 status code instead of html error Fixes #32248 * Fix Get Project Issues when user doesn't have access to project If the user doesn't have access to project and specifies the project id, then return 404 - not html. Fixes #32249 * Remove trailing commas to improve PHP 7 compatibility * Support selecting fields to return when getting issues Fixes #32331 * REST API: Add support to get user by id * REST API: User shouldn't be able to delete their own account * Tests: Support get/patch requests in RestBase class * Tests: Add a Faker class to provide fake data * Tests: Add test cases for User Create/Get/Delete * Tests: Add RequestBuilder for building http requests and use in user tests * Tests: Use RequestBuilder for IssueAddTests * Tests: Rename REST test fixtures * Tests: add more anonymous test cases for User APIs * Tests: Move delete after run of user ids to RestBase class * Tests: Remove tests for timezone since it is dependent on server timezone * Tests: Remove tests that treat numeric usernames as invalid * Localisation updates from https://translatewiki.net. * Set $g_phpMailer after creating PHPMailer object Since commit b847c59, the global var is no longer initialized, causing a new PHPMailer object to be created with each call to email_send(). When $g_phpMailer_method = PHPMAILER_METHOD_SMTP), depending on the SMTP server's settings, this could cause a delay when sending mail (e.g. if more messages are queued than allowed by the server's cooldown period) and if $g_email_send_using_cronjobjob is OFF, MantisBT could hang or even timeout. Fixes #30127 * Remove unnecessary variable assignments * Fix static analysis warnings * New internal API email_relationship_send() This avoids code duplication in email_relationship_added() and email_relationship_deleted(). Fixes #32382 * PHPDoc updates * Bump version to 2.25.7 * Use new string_truncate() instead of mb_strimwidth() This ensures that History API trunctates old_value and new_value to the expected 255 chars even when full-width CJK symbols are used. Fixes #32385 * Localisation updates from https://translatewiki.net. * New string_truncate() API function Truncate a string to the specified length, optionally appending a marker. This is intended to replace mb_strimwidth() calls when the truncation should be driven by the string's length and not its width. Issue #32385 * Bump version to 2.25.8-dev * Update bundled plugins URL * Improve PHPDoc for MantisPlugin::isValid() Clearly state what makes a plugin valid. * Allow installation of plugins without dependencies The refactoring of manage_plugin_page with objects [1] introduced a regression, preventing user from installing plugins without any dependencies (i.e. having 'requires' property null or empty array). Fixes #32390 [1]: issue #26142, commit c1076a5 * Add missing 't' prefix to variable name * docbook-manual.py: new function to run Publican [skip ci] * Bump guzzlehttp/psr7 from 1.9.0 to 1.9.1 Fixes #32432, PR mantisbt#1882 Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 1.9.0 to 1.9.1. - [Release notes](https://github.com/guzzle/psr7/releases) - [Changelog](https://github.com/guzzle/psr7/blob/1.9.1/CHANGELOG.md) - [Commits](guzzle/psr7@1.9.0...1.9.1) --- updated-dependencies: - dependency-name: guzzlehttp/psr7 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Damien Regad <dregad@mantisbt.org> * Localisation updates from https://translatewiki.net. * REST API: Implement UserGetCommand and Get User By ID Fixes #32356 * REST API: Support select in Get User API and return as users array Fixes #32357 * REST API: Get User By Ref (where ref can be id, name, email, realname) Fixes #27128 * REST API: Get API by username instead of ref - no more real name or email Fixes #27128 * Improve labels for Move Attachments system utility system_utils.php: - changed description to clearly state that the action can move files both to database and to disk - changed button label to remove "to disk" move_attachments_page.php - add tooltips for Storage column header and cells in "To Disk" and "To Database" columns - remove obsolete <th> width attribute, improve table layout - fix static analysis warnings Fixes #4993 * Localisation updates from https://translatewiki.net. * Implement VersionDeleteCommand Fixes #30415 * Use VersionDeleteCommand in REST API Fixes #30415 * Use VersionDeleteCommand in SOAP API Fixes #30415 * Use VersionDeleteCommand in Web UI Fixes #30415 * Implement VersionUpdateCommand Fixes #30415 * Update Web UI to use VersionUpdateCommand Fixes #30415 * Add REST API for updating a version Fixes #30415 * Update SOAP API to use VersionUpdateCommand Fixes #30415 * Misc update for version APIs Fixes #30415 * Implement VersionGetCommand Fixes #30415 * Update VersionAddCommand to return the created version Fixes #30415 * Add REST API to get version(s) + return version on creation Fixes #30415 * Add test cases for project version APIs + fixes Fixes #30415 * Fix failing test Fixes #30415 * Fix indentation + php docs Fixes #30415 * Add script type to MantisGraph JavaScript links Fixes #32459 * Admin check: Fix / Update PostgreSQL supported versions Fix date for version 11 Add dates for versions 14 and 15 Issue #28528 * Fix error updating issue with time-tracking notes REST API returned Slim Application Error / Unsupported operand types when attempting to update an Issue with time tracking notes. Regression introduced by 39ae82a. Fixes #29438 * Localisation updates from https://translatewiki.net. * Implement ProjectUsersAddCommand A command that supports add/update a user to a project with the specified access level. Fixes #32466 , 32468 * Update Web UI to use ProjectUsersAddCommand Fixes #32466 , 32468 * REST API: Add rest API for Adding/Updating users on a Project Fixes #32466 , 32468 * Implement ProjectUsersDeleteCommand Fixes #32467 * Update Web UI to use ProjectUsersDeleteCommand Fixes #32467 * REST API: Delete Project Users API Fixes #32467 * REST API: Support impersonation of users Fixes #32469 * Doc: hooking events declared by other plugins Co-authored by: Damien Regad <dregad@mantisbt.org> Fixes #32504 Fixes mantisbt#1871 * Implement UserUpdateCommand Fixes #32464 * Use UserUpdateCommand from Web UI Fixes #32464 * REST API: User Update API Fixes #27130, #24757 * Include header files missing for Web UI usage Fixes #32464 * Honor email notification flag in Web UI Fixes #32464 * Authorization update to UserUpdateCommand Fixes #32464 * REST API: User Update API test cases Fixes #27130, #24757 * Address PR comments Fixes #27130, #24757 * Fix error message Issue #32466 * Localisation updates from https://translatewiki.net. --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Damien Regad <dregad@mantisbt.org> Co-authored-by: Victor Boctor <vboctor@gmail.com> Co-authored-by: translatewiki.net <l10n-bot@translatewiki.net> Co-authored-by: Damien Regad <dregad@mantisbt.org> Co-authored-by: grummbeer <kde@streber24.de> Co-authored-by: Mr. Ronald <mr.ronald@gmx.de> Co-authored-by: Chris Graham <chris@ocproducts.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: grummbeer <67791701+grummbeer@users.noreply.github.com> Co-authored-by: Selonka <martinkloeppel@yahoo.de> Co-authored-by: msw <martin.schwarz@ibak.de> Co-authored-by: David Pankov <dpankov@lukanet.com> Co-authored-by: Roland Becker <roland@atrol.de>
Regarding issue https://www.mantisbt.org/bugs/view.php?id=32038