https://www.limesurvey.org/stable-release

I was thinking about this on my way in to work this morning, a wise guy once said to me that the best ideas tend to come when your not thinking about them at all... Can I set the IF statement mentioned above to look for the closed variable as True, and if so then display the survey link, whether this is to point to limesurvey or elsewhere.An example would be<?phpIF (%{ticket.status}

= 'closed' ) {echo "Please complete our <a href="survey">Satisfaction Survey</a>";}else {echo " ";}?>

I have downloaded lime survey and added to our in house hosting, but until we can manage to get the IF command working, we won't be able to start pointing to the survey we would like to use.Can this be raised with the dev team to see if anyone can figure out the best way to approach this.  I thought it would be fairly straightforward to do the IF statement by calling the variable, the problem is that I cannot figure out what the variable is, so I used the one from the email template and that doesnt seem to be working.

I don't think its likely that the devs will take the time to come to the forums to help you with your mod.We use a canned response when closing at ticket to initiate the surveys:Select canned response, set status to closed/resolved/whatever, click Post Reply.

/agrees with @[deleted]

9 days later

@[deleted] that's what we have done also at the moment, with the canned response showing the link to the survey.  I would like to think that the devs would be interested in looking at a feature to integrate with Lime Survey to get the two working together through the customer portal, but maybe not. 

OK found a way of doing it, by adding a line of code in to view.inc.php with the following code:obviously in the live version what the echo shows is different to this.  I hope this helps someone else out there.<?phpif ($ticket->isClosed())  {    echo "Survey.php";  }?>

2 months later

#jhollingsworth Thx that really helped me.I would like to send the Survey once every X tickets.The users open a lot of tickets and I would not want to bother them with a survey whenever  their ticket is closed, But only every few times.I would be happy for some adviceRunning on: osTicket v1.10Web Server Apache/2.4.7 (Unix)MySQL 5.0.11PHP 5.5.12 

I can think of a few ways to implement something like this. 1. check all the tickets opened by a user and divide by X.  Where x is the number of tickets you want to count.  If the result is a whole number then send an email survey.example: Joan Doe has 36 tickets.  36 divided by 3 is 12.  12 is a whole number, send the email.                John Doe has 32 tickets.  32 divided by 3 is 10.6666667.  which is not a whole numnber to not send the email.2. add a custom db column to the user table.  every time a user opens a ticket increase this number by 1.  When a ticket is closed check this number.  If the number equals your chosen number then send the email and reset the value to 0.  3. Do it manually when your agent closes the ticket.

5 years later

Hello partners, I had the same need to create a form for evaluating the service. This way I developed one on OsTicket, without the need to configure another platform. If anyone wants to use it or the community administrators, I'm available.

    a year later
    Write a Reply...