Bug 40325

Summary: UMC It's not possible to set a date as empty
Product: UCS Reporter: Daniel Orrego <orrego>
Component: UMC (Generic)Assignee: Florian Best <best>
Status: CLOSED FIXED QA Contact: Stefan Gohmann <gohmann>
Severity: normal    
Priority: P5 CC: best, gohmann, klaeser, korte, walkenhorst, wiesenthal
Version: UCS 3.2   
Target Milestone: UCS 3.2-8-errata   
Hardware: Other   
OS: Linux   
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, Usability
Max CVSS v3 score:
Bug Depends on: 32321    
Bug Blocks: 40431    

Description Daniel Orrego univentionstaff 2015-12-21 18:40:30 CET
(I'm cloning this bug to get a fix for this issue in UCS 3.2)

Once a date field is set (any date field, birthday, expiry date, etc.), one is not able to unset it again.

This is happening to us in UCS 3.2 when trying to unset a date field in UMC.

----
Internal module error: An error occured during command processing.

  File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 867, in _thread
    property_obj.syntax.parse( value )
  File "/usr/lib/pymodules/python2.6/univention/admin/syntax.py", line 124, in parse
    if self.regex is None or self.regex.match( text ) is not None:

TypeError: expected string or buffer
----


+++ This bug was initially created as a clone of Bug #32321 +++

When removing an previously set birthday:

  File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 811, in _thread
    property_obj.syntax.parse( value )
  File "/usr/lib/pymodules/python2.6/univention/admin/syntax.py", line 113, in parse
    if self.regex is None or self.regex.match( text ) is not None:

TypeError: expected string or buffer
Comment 1 Florian Best univentionstaff 2016-01-04 11:52:10 CET
univention-directory-manager-modules (9.0.76-38):
r66551 | Bug #40325: fix removal of date e.g. in account expiry date; backport of svn r56309, r56321

univention-directory-manager-modules.yaml:
r66552 | YAML Bug #40325
Comment 2 Florian Best univentionstaff 2016-01-04 11:52:41 CET
*** Bug 32321 has been marked as a duplicate of this bug. ***
Comment 3 Florian Best univentionstaff 2016-01-04 11:54:03 CET
*** Bug 32504 has been marked as a duplicate of this bug. ***
Comment 4 Florian Best univentionstaff 2016-01-04 12:44:39 CET
To fix this also for the birthdate None must also be allowed by the "simple" syntax class:
r66556 | Bug #40325: allow None to be passed to the 'simple' syntax class.
Comment 5 Stefan Gohmann univentionstaff 2016-01-06 09:45:29 CET
Code review: OK

Tests: OK

YAML: OK
Comment 6 Janek Walkenhorst univentionstaff 2016-01-13 16:57:49 CET
<http://errata.software-univention.de/ucs/3.2/391.html>