View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17554 | Bug reports | Survey taking | public | 2021-08-30 13:23 | 2021-11-02 09:06 |
Reporter | vladro93 | Assigned To | gabrieljenik | ||
Priority | low | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 5.x | ||||
Summary | 17554: If a user has more than one email associated the methods mail_registered_participants and invite_participants fail | ||||
Description | Hello, I have a problem, I am using LS5.0.12+210729. I use the method invite_participants provided by the API with a custom token that I previously set. All things work fine if the participant has only one email address, but if he has 2 ore more it fails example: test@test.com;test2@test.com. Is there a configuration for this. I have to say that using it from the GUI provided by LS works fine. | ||||
Steps To Reproduce | Use the remote control api and use the invite_participants or the mail_registered_participants methods with a participant that has more than one email asociated. | ||||
Tags | No tags attached. | ||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | 5.0.12+210729 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Chrome / FireFox | ||||
Database type & version | MySQL 7 | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | PHP 7.2.5 | ||||
Does the system explicitly support 2+ email addresses for a single participant? |
|
This is not a bug. It only supports one email/per participant. |
|
I don't understand how the same functionality in the GUI works and from the API doesn't. Basically it should be one function that is being called. This sounds like a bug to me, but it is your call. |
|
I will test this in the GUI and get back to you |
|
Yes, always did. |
|
Indeed, it worked on the GUI. |
|
@vladro93 Maybe you can suggest a pull request or fix if you already know the problematic place in the code? |
|
c_schimtz, if the GUI works doesn't it imply that the system supports 2+ emails? Also I have a hunch where the problem might be: This gets called when using invite_participants from the API if (preg_match($pattern, $oToken['email']) !== 1) { And this gets called from the GUI: I think that if should be the same in both scenarios. |
|
@ollehar i can try this, but first I have to make sure that what I found is a bug and not a new feature, as in the discussion above. |
|
Yeah, it's probably a bug. :) |
|
Here is the pull request: https://github.com/LimeSurvey/LimeSurvey/pull/2024/files |
|
Thank you for the PR, we will test and write to you if there are any questions. |
|
Didn't find a way to easily send updates to the original PR, so created a new one. I updated the indentation. Also added 'continue' after the failed validations. From what I tested it works OK. Apart from that, If I'm not mistaken, when you send the emails from the UI, there is no validation. The one used for adding a new token uses a more complex mechanism, based on LimeMailer::validateAddress(). Nevertheless, we are comparing addNew operations with sendEmail operation. Why should we validate when sending? Does that happen on UI version? |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=32771 |
|
LimeSurvey: master 56e60a23 2021-09-30 12:54 Committer: GitHub Details Diff |
Fixed issue 17554: If a user has more than one email associated the methods mail_registered_participants and invite_participants fail (#2041) Dev Co-authored-by: Vlad Rosca |
Affected Issues 17554 |
|
mod - application/helpers/remotecontrol/remotecontrol_handle.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-08-30 13:23 | vladro93 | New Issue | |
2021-08-30 13:24 | ollehar | Severity | block => partial_block |
2021-08-30 13:34 | ollehar | Note Added: 66178 | |
2021-08-30 13:34 | ollehar | Bug heat | 0 => 2 |
2021-08-30 13:41 | galads | Note Added: 66179 | |
2021-08-30 13:41 | galads | Bug heat | 2 => 4 |
2021-08-30 14:02 | vladro93 | Note Added: 66182 | |
2021-08-30 14:02 | vladro93 | Bug heat | 4 => 6 |
2021-08-30 14:16 | galads | Note Added: 66185 | |
2021-08-30 14:17 | c_schmitz | Note Added: 66186 | |
2021-08-30 14:17 | c_schmitz | Bug heat | 6 => 8 |
2021-08-30 14:24 | galads | Note Added: 66188 | |
2021-08-30 14:24 | galads | Assigned To | => galads |
2021-08-30 14:24 | galads | Status | new => confirmed |
2021-08-30 14:27 | ollehar | Note Added: 66189 | |
2021-08-30 14:28 | vladro93 | Note Added: 66190 | |
2021-08-30 14:30 | vladro93 | Note Added: 66191 | |
2021-08-30 14:36 | ollehar | Note Added: 66193 | |
2021-08-30 14:53 | vladro93 | Note Added: 66196 | |
2021-08-30 14:57 | galads | Priority | none => low |
2021-08-30 14:57 | galads | Status | confirmed => ready for testing |
2021-08-30 14:57 | galads | Sync to Zoho Project | => |Yes| |
2021-08-30 14:57 | galads | Note Added: 66197 | |
2021-09-20 15:44 | gabrieljenik | Note Added: 66534 | |
2021-09-20 15:44 | gabrieljenik | Bug heat | 8 => 10 |
2021-09-24 13:36 | c_schmitz | Assigned To | galads => c_schmitz |
2021-09-24 13:36 | c_schmitz | Status | ready for testing => assigned |
2021-09-27 08:28 | galads | Status | assigned => feedback |
2021-09-27 08:29 | galads | Assigned To | c_schmitz => gabrieljenik |
2021-09-27 08:29 | galads | Zoho Project Synchronization | Yes => |Yes| |
2021-09-30 10:54 | gabrieljenik | Changeset attached | => LimeSurvey master 56e60a23 |
2021-09-30 10:54 | gabrieljenik | Note Added: 66671 | |
2021-09-30 10:54 | gabrieljenik | Resolution | open => fixed |
2021-09-30 10:54 | c_schmitz | Status | feedback => resolved |
2021-11-02 09:06 | c_schmitz | Status | resolved => closed |