View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
20337Bug reportsUser / Groups / Rolespublic2026-02-09 19:34
ReporterFreda Assigned Totibor.pacalat  
PrioritynoneSeverityblock 
Status resolvedResolutionfixed 
Summary20337: Cannot add a User Group to Survey Permissions unless at least one User is already added
Description

When managing survey permissions, it is currently not possible to add a User Group to a survey.

Steps To Reproduce

Steps to reproduce

Steps to Reproduce:

Create a User Group and ensure it contains one or more users.

Open any existing survey.

Go to Survey → Permissions → Add user group.

Select the group and attempt to add it.

Expected result

User Groups should be assignable to surveys directly

Actual result

Nothing happens

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

Relationships

related to 20364 closedtibor.pacalat The “Add group users” button in the Survey Permissions menu does not work with firefox 

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2025-11-10 15:33

manager   ~83734

The UI might be counterintuitive, but I think this is more of a feature request than a bug.

You might think it adds the group itself, but it actually adds the group's users (those currently in the group). In fact, the button says "Add group users," not "Add user group."

In other words, if you add more users to the group later, they won't be added to the survey. So, it doesn't make sense for empty groups to appear there.

image.png (10,245 bytes)   
image.png (10,245 bytes)   
tibor.pacalat

tibor.pacalat

2025-11-19 15:10

administrator   ~83846

I don't see any PR, and I think this is an issue. I have a group with 2 users, and when I select the group and click on "Add group users" I expect these users to be added. Not that I add one user from this group first, and then I am able to add the group.

gabrieljenik

gabrieljenik

2026-02-09 14:46

manager   ~84195

https://github.com/LimeSurvey/LimeSurvey/pull/4710

At last this was a JS issue, related to pjax.
Not a functionality thing.

surveypermissions.js was not getting loaded at the first time.
These kind of screens generally load via pjax.
You go into the survey overview, and then to the permissions screen via pjax. In that case, the JS wasn't loding.

When adding a user (which think submits a form without needing the JS), the page reloads directly (without pjax) and then it starts working because the JS does gets loaded without pjax.

gabrieljenik

gabrieljenik

2026-02-09 14:48

manager   ~84196

I think this kind of errors are not the first time they happens.
Maybe we could add a test that:

  • scans all source code
  • looks for this kind of statements App()->getClientScript()->registerScriptFile(App()->getConfig('adminscripts') . 'surveypermissions.js', CClientScript::POS_END);
  • Fail if the argument CClientScript::POS_XXXX is not used.

So devs are forced to decide if they want to add it in the head or end.

DenisChenu

DenisChenu

2026-02-09 15:24

developer   ~84197

I think this kind of errors are not the first time they happens.

:+1:

guest

guest

2026-02-09 19:34

viewer   ~84199

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

Related Changesets

LimeSurvey: master d54b9bcf

2026-02-09 19:34

Gabriel Jenik

Committer: GitHub


Details Diff
Fixed issue 20337: Cannot add a User Group to Survey Permissions unless at least one User is already added (04710)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
20337
mod - application/controllers/SurveyPermissionsController.php Diff File

Issue History

Date Modified Username Field Change
2025-11-05 14:38 Freda New Issue
2025-11-05 14:38 Freda File Added: Screenshot 2025-11-05 at 11.40.16.png
2025-11-05 14:38 Freda Assigned To => gabrieljenik
2025-11-05 14:38 Freda Status new => assigned
2025-11-10 15:33 gabrieljenik Note Added: 83734
2025-11-10 15:33 gabrieljenik File Added: image.png
2025-11-10 15:33 gabrieljenik Bug heat 0 => 2
2025-11-10 15:34 gabrieljenik Assigned To gabrieljenik => tibor.pacalat
2025-11-10 15:34 gabrieljenik Status assigned => ready for testing
2025-11-19 15:10 tibor.pacalat Note Added: 83846
2025-11-19 15:10 tibor.pacalat Bug heat 2 => 4
2025-11-19 15:10 tibor.pacalat Assigned To tibor.pacalat => gabrieljenik
2025-11-19 15:10 tibor.pacalat Status ready for testing => assigned
2026-02-03 17:45 tibor.pacalat Relationship added related to 20364
2026-02-09 14:46 gabrieljenik Assigned To gabrieljenik => DenisChenu
2026-02-09 14:46 gabrieljenik Status assigned => ready for code review
2026-02-09 14:46 gabrieljenik Note Added: 84195
2026-02-09 14:48 gabrieljenik Note Added: 84196
2026-02-09 15:24 DenisChenu Note Added: 84197
2026-02-09 15:24 DenisChenu Bug heat 4 => 6
2026-02-09 15:25 DenisChenu Assigned To DenisChenu => tibor.pacalat
2026-02-09 15:25 DenisChenu Status ready for code review => ready for testing
2026-02-09 19:34 Changeset attached => LimeSurvey master d54b9bcf
2026-02-09 19:34 guest Note Added: 84199
2026-02-09 19:34 guest Bug heat 6 => 8
2026-02-09 19:34 tibor.pacalat Status ready for testing => resolved
2026-02-09 19:34 tibor.pacalat Resolution open => fixed