Group member management broken

Bug #80023 reported by Tom Hoffman
14
Affects Status Importance Assigned to Milestone
SchoolTool
Fix Released
Medium
Unassigned

Bug Description

If you add members to a group, then go to the Add/Remove Members page, the existing members have
checkboxes, presumably to allow you to delete them. However, they are all unchecked by default, and
either checking or unchecking them and clicking Done at the bottom of the form has no effect.

The same problem exists when editing a student's list of groups.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

There should be a Remove button there, but the button is missing.

I see this in the page template:

      <input type="submit" class="button-ok" name="REMOVE_MEMBERS"
        value="Remove Members" tal:condition="batch"
        title="Shortcut: Alt-R" accesskey="R"
        i18n:attributes="value submit-button; accesskey" />

For some reason tal:condition fails.

Um, the list above iterates over all members, rather than over the batch.
Something smells rotten there.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

The "Add member" search/batching interface doesn't sort the list.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Yet another funny thing. Start from this situation:

  +------------------------------+
  | [x] existing member |
  | (note lack of remove button) |
  +------------------------------+
  | [text] FIND BUTTON |
  +------------------------------+

Check existing member. Focus the text box. Type some search text. Press Enter.

Expected result:
 - existing member is NOT deleted
 - search is performed, results are shown
Actual result:
 - existing member is DELETED
 - search is performed, results are shown

Revision history for this message
Tom von Schwerdtner (tvon) wrote :

Tom:
Clicking 'Done' does what 'Cancel' used to do, meaning it makes no changes. I
chose to name it 'Done' because I did not want to give the impression that it
would cancel changes already made. Perhaps a "<- back to '{groupname}'" label
would make more sense?

Marius:
re msg1026, which view (group->members or person->groups) are you getting this in?

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Regarding "yet another funny thing" comment, I was wrong. The starting
situation should have the "Remove" button.

BTW the Remove button is displayed if the "add these persons" list at the bottom
is not empty, and hidden, when you enter a search string that finds no one.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Partial fix in rev 4686.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Another partial fix in rev 4688.

I am too lazy to fix the third and final problem -- hitting Enter in the search
text box causes the first button to be pressed in the form, and the first button
happens to be REMOVE, not SEARCH. The fix would be to specify three different
<form> elements, each with one submit button. Or maybe four -- a form for
removal, a form for searching, a form for addition, a form with the DONE button?

Also, somebody should check related other views (person's groups, teachers,
sections, wahtever)

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Things that need to be done to close this issue:
- merge revs 4686 and 4688 to release branch
- fix the problem for student's list of groups view.

Things that would be good to do, but I've run out of steam to do
- fix Enter triggering an unobvious button in the form
- check similar views and make sure they do not have this problem

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Suspected buggy templates for the "missing Remove button" issue:

./src/schooltool/browser/templates/section_instructors.pt: value="Remove"
tal:condition="batch"

./src/schoolbell/app/browser/templates/groups.pt: value="Remove"
tal:condition="batch"

Suspected buggy code for "batching unsorted lists" issue: none. All places that
create Batch instances specify a sort_by attribute.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Full list of revisions that need merging:
- 4686, 4688, 4689, 4690
- 4687 kills a DeprecationWarning, but is not critical otherwise

I'm pretty sure no other views have this bug.

Things that would be good to do, but I've run out of steam to do
- fix Enter triggering an unobvious button in the form

Revision history for this message
Brian Sutherland (jinty) wrote :

Back-ported in 4727 and 4728.

Looks like there is still an outstanding issue here, but it is not applicable to
the current release and not critical. So, downgrading to bug and defering to the
next release.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

I'll create a new issue and close this one, to reduce confusion.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.