Modify

Opened 6 years ago

Closed 5 years ago

#3954 closed defect (fixed)

Conflict with BlackMagicTicketTweaksPlugin

Reported by: todd.radel@… Owned by: coderanger
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 5 years ago by doki_pen

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed The owner will remain coderanger.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.