Edgewall Software

Ticket #7051 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

Custom-Ticket-Field Radio shows no default value

Reported by: goetzger@… Owned by: cboos
Priority: normal Milestone: 0.11
Component: ticket system Version: 0.10.4
Severity: normal Keywords:
Cc:

Description

I'd like to add a custom field to my ticket as follows:

[ticket-custom]
system_type = radio
system_type.label = System
system_type.options = OPS|Test|Devel
system_type.value = 0

But unfortunately, the radio-buttons do not show the default value set to OPS.

The default value is set correctly in the ticket even if the creater is not changing/setting it.

By using 'select' instead of 'radio' for type, it's default is shown correctly.

This has been tested on:

  • Browser:
    Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.12) Gecko/20080211 Firefox/2.0.0.12
    on a gentoo-system
  • Server:
    • www-apps/trac-0.10.4
    • www-servers/apache-2.2.8
    • dev-lang/python-2.4.4-r9

on a gentoo-system

Any ideas?

Thanks and cheers

Attachments

Change History

  Changed 10 months ago by osimons

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 0.11

I've updated TracTicketsCustomFields documentation - it is not based on index, but on value. Tested on 0.11, but it should be the same for 0.10.x as well.

Setting system_type.value = OPS should make this work.

follow-up: ↓ 3   Changed 10 months ago by goetzger@…

  • status changed from closed to reopened
  • resolution fixed deleted

This is working for system_type = select for using index or value. But unfortunately, this is not working for system_type = radio.

in reply to: ↑ 2   Changed 10 months ago by osimons

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

Replying to goetzger@gmx.de:

This is working for system_type = select for using index or value. But unfortunately, this is not working for system_type = radio.

Yeah, I've now also tested on 0.10.5dev, and confirm that no alternatives will actually set the default for that version. It is however working well for 0.11, and documentation updated to reflect working settings.

I think I can safely say this minor issue will not be fixed for 0.10 branch at this stage, so I'm re-closing the ticket. Please upgrade to 0.11 if this is important for you.

Add/Change #7051 (Custom-Ticket-Field Radio shows no default value)

Author



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