Modify

Opened 9 years ago

Closed 8 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)

Change History (1)

comment:1 Changed 8 years ago by Robert Corsaro

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.