Bug 35278 - adding computerroom fails if group without school prefix exists
adding computerroom fails if group without school prefix exists
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Computer room administration
UCS@school 3.2 R2
Other Linux
: P5 normal (vote)
: UCS@school 3.2 R2 Errata
Assigned To: Dirk Wiesenthal
Florian Best
:
Depends on: 35620
Blocks: 35617
  Show dependency treegraph
 
Reported: 2014-07-07 10:55 CEST by Florian Best
Modified: 2014-08-27 17:01 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2014-07-07 10:55:07 CEST
We received the following traceback. It is reproducible by the following steps:
1. creating a computerroom → this creates a room called "Schule-Room"
1. create a room with the same name → this created a room called "Room"
3. create again a room with the same name → traceback

When opening some room the Schoolprefix is also added to that room in the form. after saving it is displayed with the schoolprefix.

Die Ausführung des Kommandos schoolrooms/add ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py",
line 204, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 204, in
wrapper_func
    return func( *args, **kwargs )
  File
"/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolrooms/__init__.py",
line 147, in add
    group_obj.create()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 333, in
create
    return self._create()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 680, in
_create
    al=self._ldap_addlist()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/groups/group.py", line 584,
in _ldap_addlist
    raise univention.admin.uexceptions.groupNameAlreadyUsed, ': %s' % (name)
groupNameAlreadyUsed: : schule-TEST
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2014-08-15 15:18:42 CEST
@QA: Bug 35617 creates a ucs-test script that will trigger this bug.
Comment 2 Florian Best univentionstaff 2014-08-18 10:37:42 CEST
We just saw that there is no error handling and the traceback also occurs when leaving out step 2.
It is also possible to press the save button twice.
Comment 3 Dirk Wiesenthal univentionstaff 2014-08-20 00:02:47 CEST
ucs-school-umc-rooms 10.0.4-1
Comment 4 Florian Best univentionstaff 2014-08-20 12:41:56 CEST
Well, i really like your code change but you renamed one key from computers to hosts so that the test script ./25_room_management_module which rely on that name is failing.
Comment 5 Florian Best univentionstaff 2014-08-21 13:15:58 CEST
currently {'objectType': 'groups/group'} is missing in the response and 'hosts' should be removed from it.
Comment 6 Dirk Wiesenthal univentionstaff 2014-08-21 23:35:20 CEST
(In reply to Florian Best from comment #5)
> currently {'objectType': 'groups/group'} is missing in the response and
> 'hosts' should be removed from it.

{'objectType': 'groups/group'} is not missing. It is new and was not returned before. Same with 'hosts', which is new, too. I would rather not rebuild the package for that, fiddling with the automatically returned dictionary of .to_dict(). These parameters may not be used but do not do any harm (except using some bytes).
Comment 7 Florian Best univentionstaff 2014-08-22 07:08:09 CEST
Well, then please adapt the test script 25_room_management_module which is failing due to this.
Comment 8 Florian Best univentionstaff 2014-08-22 08:06:17 CEST
(In reply to Florian Best from comment #7)
> Well, then please adapt the test script 25_room_management_module which is
> failing due to this.
I asked Ammar to do this in Bug #35620.
Comment 9 Sönke Schwardt-Krummrich univentionstaff 2014-08-27 17:01:51 CEST
UCS@school 3.2 R2 v2 has been released:
http://docs.univention.de/release-notes-ucsschool-3.2R2v2-de.html

If this error occurs again, please use "Clone This Bug".