Modify ↓
Opened 16 years ago
Closed 15 years ago
#3954 closed defect (fixed)
Conflict with BlackMagicTicketTweaksPlugin
Reported by: | Todd Radel | Owned by: | Noah Kantrowitz |
---|---|---|---|
Priority: | normal | Component: | DateFieldPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
If you use the BlackMagicTicketTweaksPlugin to hide a date field, you will not be able to save any ticket, even if date_empty = true
. The DateFieldPlugin will throw a validation warning every time.
To reproduce, add the following to trac.ini
:
[ticket-custom] testdate = text testdate.date = true testdate.date_empty = true [blackmagic] tweaks = testdate testdate.ondenial = hide testdate.permission = TICKET_MODIFY
The blackmagic plugin removes the field completely, so the validate_ticket
function in filter.py sees the value as NoneType
, and cannot call strip()
. I replaced line 69 of filter.py
with the following:
val = ticket[field] if val: val = val.strip()
Attachments (0)
Note: See
TracTickets for help on using
tickets.
r6199