LimeSurvey issue tracker
Registration

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
08752Feature requests[All Projects] Expression Managerpublic2014-02-23 15:422014-02-24 20:50
Reportertpartner 
Assigned To 
PrioritynormalSeverityfeature 
StatusnewResolutionopen 
Product Version2.05+ 
Target Version2.05+Fixed in Version 
Summary08752: Expression manager date() function does not work in email templates
DescriptionThe expression manager date() function works in questions but not in email templates.
Steps To ReproduceInsert the following expression in a question and in an email template:

{date("l jS \of F Y h:i:s A")}

See the invitation email in the attached survey.
TagsNo tags attached.
Attached Files? file icon limesurvey_survey_815172.lss [^] (14,656 bytes) 2014-02-23 15:42

- Relationships
related to 06624assignedDenisChenu Development  Show logic file should check email templates as well 

-  Notes
User avatar (28885)
c_schmitz (administrator)
2014-02-24 14:44

Nobody said this would work in invitations. EM is used in the context of a survey runtime where the invitation is not - so it is more like a missing feature.
User avatar (28889)
tpartner (developer)
2014-02-24 14:59

Okay, but it seems a bit odd that we can use EM variables but not functions.

For example, this works in email templates:

{q1.question}
User avatar (28890)
c_schmitz (administrator)
2014-02-24 15:02

I agree that's weird ?
User avatar (28896)
DenisChenu (developer)
2014-02-24 16:45
edited on: 2014-02-24 16:52

Something i don't understand , we use templatereplace in Email ?

Because we use LimeExpressionManager::ProcessString in templatereplace, i allways think processtring allow EM function.

Maybe more the $bStaticReplacement param of templatereplace ?

--------------
EDIT : we use Replacefields and not templatereplace, then : can not use EM function.

User avatar (28898)
mfaber (developer)
2014-02-24 17:34

Weird indeed. In the manual (http://manual.limesurvey.org/Tokens#Email_placeholders [^]) it says:
Starting in Version 1.92, you can use Expression Manager to use expressions for tailoring an email. Please have a look at the Expression Manager HowTos for an example.


On another page (http://manual.limesurvey.org/Email_templates [^]) it says:

"All functions supported by the Expression Manager can be used, as well as token attributes if the survey uses tokens.

In case of a notification or confirmation template it is also possible to use question codes used in the survey."


I am not sure if the latter pertains to attachments (the manual is not really clear to me...)
User avatar (28899)
DenisChenu (developer)
2014-02-24 18:31

And {join(ATTRIBUTE_1,ATTRIBUTE_14)} work good.
(Replacefields use LimeExpressionManager::ProcessString)

Maybe something with date format ?
User avatar (28900)
mfaber (developer)
2014-02-24 20:50

{date("l jS \of F Y h:i:s A")} is a weird one but works well in php and nearly so in js...so I don't think that's the problem....

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: DenisChenu
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2014-02-23 15:42 tpartner New Issue
2014-02-23 15:42 tpartner File Added: limesurvey_survey_815172.lss
2014-02-24 14:41 c_schmitz Assigned To => c_schmitz
2014-02-24 14:41 c_schmitz Status new => assigned
2014-02-24 14:44 c_schmitz Note Added: 28885
2014-02-24 14:44 c_schmitz Assigned To c_schmitz =>
2014-02-24 14:44 c_schmitz Status assigned => new
2014-02-24 14:45 c_schmitz Project Bug reports => Feature requests
2014-02-24 14:59 tpartner Note Added: 28889
2014-02-24 15:02 c_schmitz Note Added: 28890
2014-02-24 16:45 DenisChenu Note Added: 28896
2014-02-24 16:45 DenisChenu Severity @50@ => feature
2014-02-24 16:52 DenisChenu Note Edited: 28896 View Revisions
2014-02-24 17:23 DenisChenu Relationship added related to 06624
2014-02-24 17:34 mfaber Note Added: 28898
2014-02-24 18:31 DenisChenu Note Added: 28899
2014-02-24 20:50 mfaber Note Added: 28900


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker