Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Sum dont work

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #208694 by brais24
Sum dont work was created by brais24
Hi people, I think I found another bug, I attach the lss survey file with the survey

File Attachment:

File Name: limesurvey...2893.lss
File Size:25 KB


The thing is, if you fill this question (multiple numerical input with min sum value 50 and max sum value 100) with the data of the attached images

Limesurvey dont let you continue, say that the answer is incorrect even when its marked as correct.

Can someone help me with this, please?

Thank you.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #208695 by Joffm
Replied by Joffm on topic Sum dont work
Yes, seems to be a bug. Still happens in 3.25.1.

But you may validate the values instead using min.value and max.value
intval(10*sum(self.NAOK))/10 ge 50 AND intval(10*sum(self.NAOK))/10 le 100

Joffm

On the other side: Talking about bugs in your outdated version (2.50/2.73, isn't it?) doesn't help.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #208696 by DenisChenu
Replied by DenisChenu on topic Sum dont work
Seems to be an issue … enter 50 on one and 0 on all other one : you can submit.

Maybe something with PHP version ?

Confirm on limequery too.

Can you report the issue ?
Currently : maybe you can set default values to 0 ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #208697 by tpartner
Replied by tpartner on topic Sum dont work
LimeSurvey version?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #208698 by DenisChenu
Replied by DenisChenu on topic Sum dont work
No !!!

Your question are mandatory : mean need a value on all input …

Remove mandatory … if you want to have 50 at minum uncheck Value range allows missing

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #208700 by brais24
Replied by brais24 on topic Sum dont work
Even with not mandatory the issue happens, my LS version is 2.72.3+171020
The topic has been locked.
  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #208701 by brais24
Replied by brais24 on topic Sum dont work
Yeah, I know, I have projected to update Limesurvey this month
The topic has been locked.
  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #208703 by brais24
Replied by brais24 on topic Sum dont work
One question about the update, if I update from 2.72 to 3.25 the themes and other things of the surveys that I have already created can stop to work, right?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #208708 by DenisChenu
Replied by DenisChenu on topic Sum dont work

brais24 wrote: Even with not mandatory the issue happens, my LS version is 2.72.3+171020

I check with 2.73.3 : seems OK

Maybe this fix needed : github.com/SondagesPro/LimeSurvey-Sondag...f16720c485eb3aa3e8e8

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #208730 by brais24
Replied by brais24 on topic Sum dont work

Joffm wrote: Yes, seems to be a bug. Still happens in 3.25.1.

But you may validate the values instead using min.value and max.value
intval(10*sum(self.NAOK))/10 ge 50 AND intval(10*sum(self.NAOK))/10 le 100

Joffm

On the other side: Talking about bugs in your outdated version (2.50/2.73, isn't it?) doesn't help.


I try to use that on question validation equation but dont do nothing, where should I put that to make it work?
The topic has been locked.
  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 3 months ago #208731 by brais24
Replied by brais24 on topic Sum dont work

brais24 wrote:

Joffm wrote: Yes, seems to be a bug. Still happens in 3.25.1.

But you may validate the values instead using min.value and max.value
intval(10*sum(self.NAOK))/10 ge 50 AND intval(10*sum(self.NAOK))/10 le 100

Joffm

On the other side: Talking about bugs in your outdated version (2.50/2.73, isn't it?) doesn't help.


I try to use that on question validation equation but dont do nothing, where should I put that to make it work?


Ok, I get done, Thank you all and specially Joffm, should I report this bug?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #208736 by DenisChenu
Replied by DenisChenu on topic Sum dont work

brais24 wrote: Ok, I get done, Thank you all and specially Joffm, should I report this bug?

Please, yes.

Strangely
Code:
echo "sum(90,8,0.4,0.4,1.2) = ".array_sum([90,8,0.4,0.4,1.2]);
give

sum(90,8,0.4,0.4,1.2) = 100


Don't understand why it don't work …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose