Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 21 months ago

#13 closed enhancement (fixed)

Add support for custom ticket fields

Reported by: Jonas Borgström Owned by: daniel
Priority: high Milestone: 0.8
Component: ticket system Version: devel
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description

It would be nice if custom fields could be added to the tickets by just added a new form items to ticket.cs.

Attachments (1)

get_config_items.patch (723 bytes ) - added by vittorio 16 years ago.
fixes AttributeError for python<2.3

Download all attachments as: .zip

Change History (14)

comment:1 by daniel, 16 years ago

Priority: highnormal
Version: 2.0

comment:2 by daniel, 16 years ago

Milestone: 2.0
Version: 2.0devel

comment:3 by daniel, 16 years ago

Severity: normalenhancement

comment:4 by daniel, 16 years ago

Milestone: 2.00.8
Priority: normalhigh

This is not so difficult, and very useful.

The tricky part is having the ticket forms be dynamic enough to represent arbitrary number of fields. Even that isn't such a big deal really.

comment:5 by anonymous, 16 years ago

What types of fields can be added? Aside from lists, will there be:

  • text
  • text area
  • checkbox
  • multiple selection lists
  • radio button group (2 for yes/no true/false, more for one of many)

Having the single selection lists is a great starting point so please don't bump this from 0.8. I just wanted to point out that having more field types would be nice. Also, how will this relate to the report queries?

comment:6 by daniel, 16 years ago

Owner: changed from Jonas Borgström to daniel
Status: newassigned

comment:7 by daniel, 16 years ago

Initial support commited in [699].

See TracTicketsCustom for sample configuration.

Yet to do:

  • 'textarea' type is missing
  • Possibly a snazzier layout of widgets
  • Add static text to 'the yellow part' when viewing a ticket with custom props.

comment:8 by vittorio, 16 years ago

i get following. maybe a python 2.1 problem ?

Traceback (most recent call last):
  File "/usr/lib/python2.1/site-packages/trac/core.py", line 486, in cgi_start
    real_cgi_start()
  File "/usr/lib/python2.1/site-packages/trac/core.py", line 481, in real_cgi_start
    dispatch_request(path_info, args, req, env, database)
  File "/usr/lib/python2.1/site-packages/trac/core.py", line 391, in dispatch_request
    module.run()
  File "/usr/lib/python2.1/site-packages/trac/Module.py", line 41, in run
    self.render()
  File "/usr/lib/python2.1/site-packages/trac/Ticket.py", line 213, in render
    insert_custom_fields(self.env, self.req.hdf)
  File "/usr/lib/python2.1/site-packages/trac/Ticket.py", line 74, in insert_custom_fields
    cfg = env.get_config_items('ticket-custom')
  File "/usr/lib/python2.1/site-packages/trac/Environment.py", line 185, in get_config_items
    return self.cfg.items(section)
AttributeError: ConfigParser instance has no attribute 'items'

comment:9 by arnarb@…, 16 years ago

I get the same error as vittorio on 2.2

comment:10 by arnarb@…, 16 years ago

Python docs say ConfigParser.items is new since 2.3

by vittorio, 16 years ago

Attachment: get_config_items.patch added

fixes AttributeError for python<2.3

comment:11 by vittorio, 16 years ago

attached get_config.item.patch that fixes the AttributeError (warning: im new to python)

comment:12 by daniel, 16 years ago

Applied patch in [706]. Thanks a bunch, man :)

comment:13 by daniel, 16 years ago

Resolution: fixed
Status: assignedclosed

Closed in [714].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain daniel.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from daniel to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.