Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12121 closed defect (fixed)

Does not work with checkbox type fields

Reported by: ralph@… Owned by: Ryan J Ollos
Priority: normal Component: TicketValidatorPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

This plugin (which is really nice btw) doesn't work with checkbox type fields. The validator triggers on a field being empty or having zero length. Since a checkbox field has a value of 0 by default, it not being checked isn't considered as "missing", so even if set as required the validator will not stop the ticket from proceeding if the box is unchecked.

Adding a check for "equals zero" for checkbox type fields in the _is_empty function will probably fix it.

Attachments (0)

Change History (5)

comment:1 Changed 10 years ago by Ryan J Ollos

Owner: changed from Max Stewart to Ryan J Ollos
Status: newaccepted

comment:2 Changed 10 years ago by dhealey@…

I have tested the current version, in my testing and production environments, having select, check boxes, date/time fields in various states required. All appear to be working correct with the latest changes.

comment:3 Changed 10 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

Thanks, let's call it fixed in [14383] then.

comment:4 Changed 10 years ago by dhealey@…

I'd have to agree, it is fixed. I can provide screen shots if required.

comment:5 Changed 10 years ago by ralph@…

After I updated to that version, it worked for me as well - thanks guys!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.