View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
09776Feature requestsRemoteControlpublic2015-07-22 14:43
ReporterJanE Assigned Toc_schmitz  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Fixed in Version2.06+ 
Summary09776: Mail registered participants with RemoteControl API
DescriptionFeature request: the RemoteControl API can be used to send invite messages and reminders. For use in external applications that add people to the token table, sending 'register messages' is preferable.
Additional InformationSee https://bugs.limesurvey.org/view.php?id=9764 where we talked about this. I will provide a PR.
TagsNo tags attached.
Bug heat12

Relationships

related to 09788 assignedc_schmitz Add event for plugins to create new feature in Remote Control API 

Users monitoring this issue

User List JanE

Activities

JanE

JanE

2015-07-13 17:06

reporter   ~32677

See PR https://github.com/LimeSurvey/LimeSurvey/pull/339

mail_registered_participants is almost a direct copy of invite_participants, with one significant change: the default conditions can be overridden. Main use: do not mail all 'unsent' users, but select one.

For instance select one by tid:

    $overrideAllConditions = Array();
    $overrideAllConditions[] = 'tid = 12345';
    $response = $myJSONRPCClient->mail_registered_participants( $sessionKey, $survey_id, $overrideAllConditions );
JanE

JanE

2015-07-13 17:10

reporter   ~32678

@DenisChenu or @Mazi
Do i need to create PR's for other branches?
DenisChenu

DenisChenu

2015-07-13 17:22

developer   ~32679

Last edited: 2015-07-13 17:22

View 2 revisions

Hi JanE : for develop : surely (but not sure remote control work on develop)

I don't not use Remote control a lot for mail sending, but the condition for invite_participants seems very a good idea .

JanE

JanE

2015-07-13 17:46

reporter   ~32680

PR for the develop branch:
https://github.com/LimeSurvey/LimeSurvey/pull/340
JanE

JanE

2015-07-13 17:57

reporter   ~32681

Last edited: 2015-07-14 03:53

View 2 revisions

I will implement $overrideAllConditions in invite_participants as soon as this is tested for mail_registered_participants. invite_participants uses findUninvited() in stead of findAll(), so I will have to copy the conditions from findUninvited() to remotecontrol_handle.php. Adding features is less dangerous than changing current code.

DenisChenu

DenisChenu

2015-07-13 18:03

developer   ~32682

Yes, i know .... for sending email : i add my own controller , for commands:

Own Class in commands
commands/myOwnClass.php

This never break , and it's more easy to fix when updating LS core.
JanE

JanE

2015-07-13 18:19

reporter   ~32683

My first thoughts were the same: a modified commands/InviteCommand.php
https://bugs.limesurvey.org/view.php?id=9764
But the two of you talked me into changing the RC API.

But you are right: we are going to use this in production and have to be very careful with updating LS. Could you pull this and/or speedup a new build?
DenisChenu

DenisChenu

2015-07-13 18:31

developer   ~32685

For using on Production : why not make your own class ?
(I'm not use any of Remote_control t accept pull request in remote_control actually, like already said : i'm only a dev, not the leader dev).
JanE

JanE

2015-07-13 18:39

reporter   ~32686

I'd rather see this ASAP in the current 2.06 branch than muddling with OwnClasses. Should we involve @c_schmitz in this?
Mazi

Mazi

2015-07-13 18:54

partner   ~32687

Sam, can you please have a short look at the LS 3 pull request and merge if it looks fine to you?!

Please also merge the 2.06 PR. This is LSRC only so it won't break anything at the core and Jan is on stand-by for fixing any upcoming issues.

Thanks!
JanE

JanE

2015-07-14 03:52

reporter   ~32688

Last edited: 2015-07-14 03:52

View 2 revisions

Both PRs have a second commit now to fix a typo (consitions -> conditions).

I have the documentation ready and can add that to https://manual.limesurvey.org/RemoteControl_2_API as soon as the PRs are merged

JanE

JanE

2015-07-14 04:36

reporter   ~32689

Last edited: 2015-07-14 04:37

View 2 revisions

Talking about the docs: https://manual.limesurvey.org/RemoteControl_2_API#PHP_Example is outdated, now that there is a jsonRPCClient.php in application/libraries/

Composer is not needed to pull the weberhofer/jsonrpcphp repository and calling the RC is easier:

    require_once 'application/libraries/jsonRPCClient.php';
    ...
    $myJSONRPCClient = new JsonRPCClient( LS_BASEURL.'index.php/admin/remotecontrol' );

Note that the URL for the LSRC has changed as well /index.php/admin/remotecontrol.

Shall I update this part of the docs as well?

sammousa

sammousa

2015-07-14 13:08

reporter   ~32690

Fix committed to develop branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=15566
JanE

JanE

2015-07-20 11:24

reporter   ~32722

Last edited: 2015-07-22 12:39

View 2 revisions

Thanks for committing. The PR for the master branch is still open. Would not it be better to re-assign the issue to @c_schmitz so he can take care of it when he is back from holiday?

c_schmitz

c_schmitz

2015-07-22 09:59

administrator   ~32747

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=15600
JanE

JanE

2015-07-22 12:39

reporter   ~32752

Edited the documentation:
https://manual.limesurvey.org/RemoteControl_2_API#mail_registered_participants
JanE

JanE

2015-07-22 12:43

reporter   ~32753

This issue can be marked as fixed and closed IMHO. I cannot do that because 'reporters' cannot Assign to, Change status, Stick/unstick, Clone or Close. Reporters can't even Edit the original issue.

Maybe you should "Allow Reporter to close Issue"
https://www.mantisbt.org/forums/viewtopic.php?f=3&t=21761
DenisChenu

DenisChenu

2015-07-22 12:52

developer   ~32754

I think the problem is (in general) :
- Fix the issue : the issue is fixed in GIT
- Close the issue : the release is done.

But still a good idea to leave more option to Reporter (and feedback assigned to reporter too ;) )

Related Changesets

LimeSurvey: master 017211d3

2015-07-13 14:57:02

Jan-E

Details Diff
Fix 09776: Mail registered participants with RemoteControl API Affected Issues
09776
mod - application/helpers/admin/token_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

LimeSurvey: develop 2e25dcbe

2015-07-13 15:42:32

Jan-E

Details Diff
Fix 09776: Mail registered participants with RemoteControl API (develop branch) Affected Issues
09776
mod - application/helpers/admin/token_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

LimeSurvey: master 14ce4be8

2015-07-14 01:43:26

Jan-E

Details Diff
Fix 09776: Mail registered participants with RemoteControl API

Fix typo
Affected Issues
09776
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

LimeSurvey: develop 9b511885

2015-07-14 01:45:48

Jan-E

Details Diff
Fix 09776: Mail registered participants with RemoteControl API

Fix typo
Affected Issues
09776
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

LimeSurvey: develop ce0bb95c

2015-07-14 11:08:32

sammousa

Details Diff
Merge pull request #340 from Jan-E/develop

Fix 09776: Mail registered participants with RemoteControl API
Affected Issues
09776
mod - application/helpers/admin/token_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

LimeSurvey: master 1f382c37

2015-07-22 07:59:03

c_schmitz

Details Diff
Merge pull request #339 from Jan-E/master

Fix 09776: Mail registered participants with RemoteControl API & Fix 09783: Use "adminname <adminemail>" as from-header in emailTokens
Affected Issues
09776, 09783
mod - application/helpers/admin/token_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2015-07-13 16:46 JanE New Issue
2015-07-13 16:46 JanE Issue Monitored: JanE
2015-07-13 17:06 JanE Note Added: 32677
2015-07-13 17:10 JanE Note Added: 32678
2015-07-13 17:22 DenisChenu Note Added: 32679
2015-07-13 17:22 DenisChenu Note Edited: 32679 View Revisions
2015-07-13 17:46 JanE Note Added: 32680
2015-07-13 17:57 JanE Note Added: 32681
2015-07-13 18:03 DenisChenu Note Added: 32682
2015-07-13 18:19 JanE Note Added: 32683
2015-07-13 18:31 DenisChenu Note Added: 32685
2015-07-13 18:39 JanE Note Added: 32686
2015-07-13 18:53 Mazi Assigned To => sammousa
2015-07-13 18:53 Mazi Status new => assigned
2015-07-13 18:54 Mazi Note Added: 32687
2015-07-14 03:52 JanE Note Added: 32688
2015-07-14 03:52 JanE Note Edited: 32688 View Revisions
2015-07-14 03:53 JanE Note Edited: 32681 View Revisions
2015-07-14 04:36 JanE Note Added: 32689
2015-07-14 04:37 JanE Note Edited: 32689 View Revisions
2015-07-14 13:08 Changeset attached => LimeSurvey develop 2e25dcbe
2015-07-14 13:08 Changeset attached => LimeSurvey develop 9b511885
2015-07-14 13:08 sammousa Changeset attached => LimeSurvey develop ce0bb95c
2015-07-14 13:08 sammousa Note Added: 32690
2015-07-14 13:08 sammousa Resolution open => fixed
2015-07-20 11:24 JanE Note Added: 32722
2015-07-22 09:59 Changeset attached => LimeSurvey master 017211d3
2015-07-22 09:59 Changeset attached => LimeSurvey master 14ce4be8
2015-07-22 09:59 c_schmitz Changeset attached => LimeSurvey master 1f382c37
2015-07-22 09:59 c_schmitz Note Added: 32747
2015-07-22 09:59 c_schmitz Assigned To sammousa => c_schmitz
2015-07-22 10:19 DenisChenu Relationship added related to 09788
2015-07-22 12:39 JanE Note Added: 32752
2015-07-22 12:39 JanE Note Edited: 32722 View Revisions
2015-07-22 12:43 JanE Note Added: 32753
2015-07-22 12:52 DenisChenu Note Added: 32754
2015-07-22 14:43 c_schmitz Status assigned => closed
2015-07-22 14:43 c_schmitz Fixed in Version => 2.06+
2021-08-02 17:30 guest Bug heat 10 => 12