View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
18050Bug reportsOtherpublic2022-05-02 10:33
Reporterc_schmitz Assigned Togabrieljenik  
PriorityimmediateSeveritypartial_block 
Status closedResolutionfixed 
Product Version5.3.x 
Summary18050: Admin notification email sent out even when disabled
Description

When using setting a admin notification email in global survey settings the notification email seems always to be sent out - even when it is disabled in the normal survey settings

Steps To Reproduce

Steps to reproduce

I have set in global survey settings an admin notification email address.
In the survey itself, I have disabled the 'inherit' and left the admin notification email field empty.

Expected result

No admin submission notification being sent out

Actual result

Admin submission notification being sent out.

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)5.3.11
I will donate to the project if issue is resolvedNo
Browser
Database type & versionn/a
Server OS (if known)
Webserver software & version (if known)
PHP Versionn/a

Relationships

parent of 18058 feedbackgabrieljenik Some survey attributes use the empty value for N and confuses inheritance rules 
Not all the children of this issue are yet resolved or closed.

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2022-04-25 21:28

manager   ~69229

Last edited: 2022-04-25 21:32

Since survey settings inheritance have been introduced, empty attributes have always been inherited.
But for some attributes, an empty value is actually a valid attribute.

In those cases, the inheritance rules get confused. Is the attribute empty because it should be inherited or because it is deactivated?
Created specific rules for specific attributes.

PR: https://github.com/LimeSurvey/LimeSurvey/pull/2370

c_schmitz

c_schmitz

2022-04-26 10:13

administrator   ~69241

I thought in this case the field would store the value 'inherit'.

DenisChenu

DenisChenu

2022-04-26 11:47

developer   ~69242

I really think we must move inherit to null in database.
Then you can merge attributes
finalValues= array_merge(
$globalValues,
$groupSettings,
$surveySettings
);

Maybe we can reproduce with some array_filter ?
array_filter($surveySettings, function($setting) {
return $setting != "inherit";
});

gabrieljenik

gabrieljenik

2022-04-26 15:17

manager   ~69245

The solution I uploaded is a temporary solution.
Alternatives we thought:

Right now the buttons are "Inherit On", "Inherit Off".
Make them "On", "Off", "Inherir".
In case they select "Off", we can:
a) store "N" in the email field or
b) store "N" on a new field.
c) store empty on the email field.
That would be a UI complement to the current patch.
Not much else needed.

I think the best and the less error prone is alternative B.

gabrieljenik

gabrieljenik

2022-04-26 15:18

manager   ~69246

I really think we must move inherit to null in database.

Not sure I follow. Isn't that a different discussion?
The problem here is that we are using empty as a NO option but the inheritance is understanding it as an Inherit command

gabrieljenik

gabrieljenik

2022-04-27 20:58

manager   ~69273

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

LimeBot

LimeBot

2022-05-02 10:33

administrator   ~69329

Fixed in Release 5.3.12+220502

Related Changesets

LimeSurvey: master 4ca5c39a

2022-04-27 20:46:15

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 18050: Admin notification email sent out evem when disabled (#2370) Affected Issues
18050
mod - application/models/SurveysGroupsettings.php Diff File

Issue History

Date Modified Username Field Change
2022-04-25 17:36 c_schmitz New Issue
2022-04-25 17:37 c_schmitz Assigned To => aesteban
2022-04-25 17:37 c_schmitz Priority none => immediate
2022-04-25 17:37 c_schmitz Status new => assigned
2022-04-25 17:47 c_schmitz Assigned To aesteban => gabrieljenik
2022-04-25 18:00 c_schmitz Description Updated
2022-04-25 18:00 c_schmitz Summary Admin notification email sent out evem when disabled => Admin notification email sent out even when disabled
2022-04-25 21:28 gabrieljenik Status assigned => ready for testing
2022-04-25 21:28 gabrieljenik Note Added: 69229
2022-04-25 21:28 gabrieljenik Bug heat 0 => 2
2022-04-25 21:32 gabrieljenik Note Edited: 69229
2022-04-26 10:13 c_schmitz Note Added: 69241
2022-04-26 10:13 c_schmitz Bug heat 2 => 4
2022-04-26 11:47 DenisChenu Note Added: 69242
2022-04-26 11:47 DenisChenu Bug heat 4 => 6
2022-04-26 15:17 gabrieljenik Note Added: 69245
2022-04-26 15:18 gabrieljenik Note Added: 69246
2022-04-27 20:46 c_schmitz Status ready for testing => resolved
2022-04-27 20:46 c_schmitz Resolution open => fixed
2022-04-27 20:49 gabrieljenik Issue cloned: 18058
2022-04-27 20:49 gabrieljenik Relationship added parent of 18058
2022-04-27 20:58 gabrieljenik Changeset attached => LimeSurvey master 4ca5c39a
2022-04-27 20:58 gabrieljenik Note Added: 69273
2022-05-02 10:33 LimeBot Note Added: 69329
2022-05-02 10:33 LimeBot Status resolved => closed
2022-05-02 10:33 LimeBot Bug heat 6 => 8