Edgewall Software
Modify

Opened 6 years ago

Closed 5 years ago

Last modified 3 years ago

#10772 closed enhancement (fixed)

Set default component to empty string

Reported by: asaf.levy@… Owned by: Ryan J Ollos
Priority: normal Milestone: 1.1.2
Component: ticket system Version: 0.11.5
Severity: normal Keywords: component
Cc: ivanelsonnunes@…
Release Notes:
  • Added [ticket] allowed_empty_fields, which specifies ticket select fields for which an empty value is one of the selections. The option was named optional_fields prior to 1.1.6.
  • Added Clear Default button to the Component and Enum pages.
API Changes:

Description

I am trying to set the default component to an empty string. but when ever I set the default value = to an empty value it will be set to the first on the list of components.

Attachments (0)

Change History (11)

comment:1 Changed 6 years ago by Christian Boos

Keywords: component added
Milestone: unschedulednext-stable-1.0.x

Such an empty component would have to exist first, but it looks like you can't create a component with an empty name.

You could simply create a dummy component named '(none)' or '(unspecified)' and make this the default.

OTOH, it might be useful to be able to leave it really unset (especially with the 1.0 "graying out" of unspecified fields).

comment:2 in reply to:  1 Changed 5 years ago by Ryan J Ollos

Owner: set to Ryan J Ollos
Status: newassigned

Replying to cboos:

OTOH, it might be useful to be able to leave it really unset (especially with the 1.0 "graying out" of unspecified fields).

This was also requested in #11300. I made the comment there that it might also make sense to allow Priority and Severity to be left unset, but maybe not for Type and Resolution.

comment:3 Changed 5 years ago by Ryan J Ollos

By allowing an empty component we would also resolve an inconsistency that currently exists in that the Query page allows a Component filter with an empty value.

comment:4 Changed 5 years ago by Ryan J Ollos

Cc: ivanelsonnunes@… added
Milestone: next-stable-1.0.x1.1.2

How about a new configuration option, [ticket] optional_fields? One potential source of confusion though is that the use of the term optional may lead some to believe that not including a field in the list will force a user to choose a selection before submitting a form, a feature which might be enforced in the future through a required option.

Proposed changes can be found in log:rjollos.git:t10772. The optional parameter is also passed to query page, and utilized in the query and batch modification forms.

For TracTicketsCustomFields, it is already possible to include an empty entry in the selections by adding a trailing |, or an empty string between a pair of pipes. I opted to add the flexibility of allowing custom fields to also be specified in [ticket] optional_fields.

In the future I'll add the functionality to allow the configuration option to be set from the admin pages, but I'd like to complete some other changes to the admin pages before implementing that.

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:5 Changed 5 years ago by Ryan J Ollos

Type: taskenhancement

comment:6 Changed 5 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Committed to trunk in [12343].

comment:7 in reply to:  4 Changed 5 years ago by Ryan J Ollos

Replying to rjollos:

In the future I'll add the functionality to allow the configuration option to be set from the admin pages, but I'd like to complete some other changes to the admin pages before implementing that.

Specifically, it was discussed in #7850 to move the [ticket] default_* options into the database. When that is done, we could also move the [ticket] optional_fields option to the database and add the Admin page functionality at that time.

comment:8 Changed 4 years ago by Ryan J Ollos

Release Notes: modified (diff)

comment:9 in reply to:  4 Changed 4 years ago by Ryan J Ollos

Replying to rjollos:

Proposed changes can be found in log:rjollos.git:t10772. The optional parameter is also passed to query page, and utilized in the query and batch modification forms.

For TracTicketsCustomFields, it is already possible to include an empty entry in the selections by adding a trailing |, or an empty string between a pair of pipes. I opted to add the flexibility of allowing custom fields to also be specified in [ticket] optional_fields.

This resolves the issue reported in th:#10913.

comment:10 Changed 3 years ago by Ryan J Ollos

I'm reconsidering the naming of this field. Maybe [ticket] allowed_empty_fields is more clear?

comment:11 Changed 3 years ago by Ryan J Ollos

Release Notes: modified (diff)

comment:10 change committed to trunk in [14153].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.
to The owner will be changed from Ryan J Ollos 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.