Edgewall Software

Ticket #13 (closed enhancement: fixed)

Opened 5 years ago

Last modified 2 years ago

Add support for custom ticket fields

Reported by: jonas Owned by: daniel
Priority: high Milestone: 0.8
Component: ticket system Version: devel
Severity: normal Keywords:
Cc:

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

get_config_items.patch (0.7 KB) - added by vittorio 5 years ago.
fixes AttributeError? for python<2.3

Change History

Changed 5 years ago by daniel

  • priority changed from high to normal
  • version set to 2.0

Changed 5 years ago by daniel

  • version changed from 2.0 to devel
  • milestone set to 2.0

Changed 5 years ago by daniel

  • severity changed from normal to enhancement

Changed 5 years ago by daniel

  • priority changed from normal to high
  • milestone changed from 2.0 to 0.8

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.

Changed 5 years ago by anonymous

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?

Changed 5 years ago by daniel

  • owner changed from jonas to daniel
  • status changed from new to assigned

Changed 5 years ago by daniel

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.

Changed 5 years ago by vittorio

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'

Changed 5 years ago by arnarb@…

I get the same error as vittorio on 2.2

Changed 5 years ago by arnarb@…

Python docs say ConfigParser?.items is new since 2.3

Changed 5 years ago by vittorio

fixes AttributeError? for python<2.3

Changed 5 years ago by vittorio

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

Changed 5 years ago by daniel

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

Changed 5 years ago by daniel

  • status changed from assigned to closed
  • resolution set to fixed

Closed in [714].

Add/Change #13 (Add support for custom ticket fields)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from daniel. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.