Opened 7 years ago

Closed 2 months ago

#17210 closed Cleanup/optimization (fixed)

Make NullBooleanSelect for NullBooleanField pass true/false as a GET parameter

Reported by: anatoly techtonik <techtonik@…> Owned by: Basil Dubyk
Component: Forms Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

Currently, NullBooleanSelect uses form with the following parameters:

choices = ((u'1', ugettext('Unknown')), (u'2', ugettext('Yes')), (u'3', ugettext('No')))

which generates URLs like ?param=3 for Param: No selection and ?param=1 for Param: Unknown. This makes URLs pretty counter-intuitive for search forms. For example, imaging search for issues. If you need to find all closed issues, the URL will be ?closed=3, not ?closed=1 as you may assume for boolean field.

It will be more user-friendly to generate param=, param=true and param=false for boolean field URLs.

Change History (6)

comment:1 Changed 7 years ago by Aymeric Augustin

Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization
Version: 1.2SVN

I'm accepting the idea on principle, but I'd like to see a thorough analysis of how much backwards-incompatibility this change introduces.

comment:2 Changed 2 months ago by Basil Dubyk

Owner: changed from nobody to Basil Dubyk
Status: newassigned

comment:3 Changed 2 months ago by Basil Dubyk

Has patch: set

comment:4 Changed 2 months ago by Tim Graham

Patch needs improvement: set

comment:5 Changed 2 months ago by Basil Dubyk

Patch needs improvement: unset

PR updated. Tim Graham many thanks for comments.

comment:6 Changed 2 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 35a08b85:

Fixed #17210 -- Made NullBooleanSelect use unknown/true/false as query data.

Note: See TracTickets for help on using tickets.
Back to Top