Defect #8029

List of users for adding to a group may be empty if 100 first users have been added

Added by Petr Pospisil over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:2011-03-31
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Groups
Target version:1.2.0
Resolution:Fixed Affected version:1.1.2

Description

Hello,

Why I cannot add more than 100 users to group? Because line 27 at /groups/_users.html.rb:
<% users = User.active.find(:all, :limit => 100) - @group.users %>

It is wrong. After 100 users added to group, the variable users is forever blank. Even when I have hundreds users.

Thanks for fix

Petr

Associated revisions

Revision 5284
Added by Jean-Philippe Lang over 6 years ago

Fixed: list of users for adding to a group may be empty if 100 first users have been added (#8029).

History

#1 Updated by Etienne Massip over 6 years ago

  • Target version set to Candidate for next minor release

#2 Updated by Jean-Philippe Lang over 6 years ago

Just type a few letters in the field above the list and the user you want to add will show up.

#3 Updated by Etienne Massip over 6 years ago

Can't we add a named scope User#not_in_group(user_group) for correctness ?

(or something like this)

#4 Updated by Jean-Philippe Lang over 6 years ago

  • Subject changed from /groups/_users.html.erb to List of users for adding to a group may be empty if 100 first users have been added
  • Status changed from New to Closed
  • Target version changed from Candidate for next minor release to 1.2.0
  • Resolution set to Fixed

Just done in r5284 before I saw your update :-)

#5 Updated by Jean-Philippe Lang over 6 years ago

User.not_in_group() actually.

#6 Updated by Etienne Massip over 6 years ago

Niiiice =)

#7 Updated by Petr Pospisil over 6 years ago

thanks for fix

Also available in: Atom PDF