Modify

Opened 10 months ago

Closed 4 days ago

#11573 closed enhancement (fixed)

Show projects as dropdown in custom query form

Reported by: endquote Owned by: falkb
Priority: normal Component: SimpleMultiProjectPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

On the custom query form, if you filter on a project, the filter rule is a text-entry field. It would be nice if that were a dropdown list of open projects.

Attachments (1)

SimpleMultiProject_plugin_11573.patch (4.2 KB) - added by Cinc 6 days ago.
Patch to use 'select' ticket custom field instead of 'text' for project information

Download all attachments as: .zip

Change History (12)

comment:1 Changed 6 days ago by Cinc

I created a patch to use a 'select' field instead of a 'text' for the ticket custom field. This way a drop down list is automatically used on the query page. The items for the select field are taken from the db and kept internally. No need to add them to trac.ini.

This works ok for me so far. For current installations just change the definition for the field from 'text' to 'select' in trac.ini and you are set. No need for database changes and stuff. You may reverse the change at any time because there is just text saved in the database but no information about the field type used to gather the text.

The patch is against sources with patch for #12113 applied.

Changed 6 days ago by Cinc

Patch to use 'select' ticket custom field instead of 'text' for project information

comment:2 Changed 6 days ago by falkb

Seems to be an awesome fix!! Gonna hurry up to test it soon... stay tuned, Cheers, F@lk

comment:3 Changed 6 days ago by falkb

  • Status changed from new to accepted

comment:4 Changed 6 days ago by falkb

  • Resolution set to fixed
  • Status changed from accepted to closed

In 14335:

, fixes #11573:
Thanks and kudos to Cinc for 2 nice patches!:

  • better support of custom themes (fixes #12113)
  • with [ticket-custom] option project = select , custom queries show project list as drop-down now
  • additionally: show version drop-down in ticket-change form as ordered list now

comment:5 follow-up: Changed 6 days ago by falkb

Works well here, too. Even still if not set to 'select' type.

BTW: Cinc, do you see how to get an alphabetically ordered list of versions in a custom-query?

comment:6 Changed 6 days ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

I found one annoyance with multi environment installations.

Please remove the lines

Option("ticket-custom", "project", "select", doc="Ticket custom field needed for SimpleMultiProject plugin. This must be of type select.")
Option("ticket-custom", "project.label", "Project", doc="Label for ticket custom field used by SimpleMultiProject plugin.")

from ticket.py.

Otherwise the ticket custom field will be added to trac environments even if the plugin is disabled.

comment:7 Changed 6 days ago by falkb

  • Status changed from reopened to accepted

OK

comment:8 in reply to: ↑ 5 ; follow-up: Changed 6 days ago by anonymous

Replying to falkb:

Works well here, too. Even still if not set to 'select' type.

BTW: Cinc, do you see how to get an alphabetically ordered list of versions in a custom-query?

You mean in a drop down list or in the ticket table?

/me confused

comment:9 in reply to: ↑ 8 Changed 6 days ago by falkb

Replying to anonymous:

You mean in a drop down list or in the ticket table?

The drop down list of the common 'version' field, seems not to be ordered here, alphabetically

comment:10 Changed 6 days ago by falkb

see also the addon commit [14336]

comment:11 Changed 4 days ago by falkb

  • Resolution set to fixed
  • Status changed from accepted to closed

Cinc, it seems to me an ordered version list in the dropdown box on the custom query form is out of reach for this plugin, right? Any idea?

Add Comment

Modify Ticket

Action
as closed The owner will remain falkb.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.