Modify

Opened 14 years ago

Last modified 7 years ago

#8897 new enhancement

Validate on ticket type and match all statuses

Reported by: Reinhard Wobst Owned by:
Priority: normal Component: TicketValidatorPlugin
Severity: normal Keywords: status, data type, validator
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

After user over longer time, I decided to publish an improvement of the TicketValidatorPlugin:

  • Check for all statuses of the ticket (requested in ticket #4742)
  • Check dependent on type of the ticket (requested in ticket #6067).

Details can be found in validator.txt in the source (ticketvalidator.zip). Here is some example:

[ticketvalidator]
new.required = purpose
*.required = address
done.*.required = weather, brightness
*.integer = age, lines_of_code
*.task.float = cost

This means:

  • If the state is 'new', the field 'purpose' must be filled-in.
  • 'address' is always required.
  • If the state is 'done', 'weather' and 'brightness' are required, independent on the type (of course, "done.required = ..." would do the same here).
  • 'age' and 'lines_of_code' must always be integers.
  • Independent on the state, 'cost' must be a float if the ticket type is 'task'.

More data types can be implemented easily.

Reinhard

Attachments (1)

ticketvalidator.zip (19.6 KB) - added by Reinhard Wobst 14 years ago.
zipped source

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by Reinhard Wobst

Attachment: ticketvalidator.zip added

zipped source

comment:1 Changed 10 years ago by Ryan J Ollos

#7218 closed as a duplicate.

comment:2 Changed 7 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 7 years ago by Ryan J Ollos

Summary: Extension of TicketValidator Plugin: Check on data type, check independent on statusValidate on ticket type and match all statuses

comment:4 Changed 7 years ago by Ryan J Ollos

Owner: Max Stewart deleted

comment:5 Changed 7 years ago by Ryan J Ollos

#4742 closed as a duplicate.

comment:6 Changed 7 years ago by Ryan J Ollos

#12588 closed as a duplicate, and has a patch.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


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

 
Note: See TracTickets for help on using tickets.