Difference between revisions of "RemoteControlLimeSurvey"

From Request Tracker Wiki
Jump to navigation Jump to search
(Re-formatted code for better readability)
 
m (4 revisions imported)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= '''This Version is for LimeSurvey smaller than version 2.''' =
= Overview =
= Overview =



Latest revision as of 16:36, 6 April 2016

This Version is for LimeSurvey smaller than version 2.

Overview

When a ticket is closed out this scrip will use LSRC to make changes to a Limesurvey survey. In this case, it adds a token to the survey that is set to the ticket number. After configuring LimeSurvey for LSRC, i had to add SOAP::Lite to the RT machine.

Scrip

  • Custom action preparation code:
return 1;
  • Custom action cleanup code:
use SOAP::Lite; 
use strict; 
use warnings;

my $service = SOAP::Lite->service('http://webserver/limesurvey/survey/admin/remotecontrol/lsrc.server.php?wsdl');


my $surveyid = SurveyID; 
my $token = $self->TicketObj->id; 
my $username = 'limesurvey user'; 
my $password = 'password';

my $retval = $service->sInsertToken( $username, $password, $surveyid, $token );

return 1;