[Django] #21186: list_filter on a date field is not working as expected

11 views
Skip to first unread message

Django

unread,
Sep 27, 2013, 1:37:52 PM9/27/13
to django-...@googlegroups.com
#21186: list_filter on a date field is not working as expected
---------------------------------+--------------------
Reporter: onlygoldi2201@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------
I am new user of Django and i am learning it.

I expect books which are getting publish in future date in the current
month/year to be shown when i select "this month" or "this year". But it's
show results only till current date.

I am attaching some of snapshots of web page and code as well, please let
me know if any other information is needed.

--
Ticket URL: <https://code.djangoproject.com/ticket/21186>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 27, 2013, 4:32:01 PM9/27/13
to django-...@googlegroups.com
#21186: list_filter on a date field is not working as expected
---------------------------------+--------------------------------------

Reporter: onlygoldi2201@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by ramiro):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Thanks for your report.

Which database backend are you using?

--
Ticket URL: <https://code.djangoproject.com/ticket/21186#comment:1>

Django

unread,
Sep 27, 2013, 4:55:01 PM9/27/13
to django-...@googlegroups.com
#21186: list_filter on a date field is not working as expected
---------------------------------+------------------------------------

Reporter: onlygoldi2201@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by ramiro):

* stage: Unreviewed => Accepted


Comment:

We've been able to reproduce this with sqlite3 and MySQL

--
Ticket URL: <https://code.djangoproject.com/ticket/21186#comment:2>

Django

unread,
Sep 27, 2013, 5:27:41 PM9/27/13
to django-...@googlegroups.com
#21186: list_filter on a date field is not working as expected
---------------------------------+------------------------------------

Reporter: onlygoldi2201@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Release blocker | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by bmispelon):

* cc: bmispelon@… (added)
* version: 1.5 => master
* severity: Normal => Release blocker


Comment:

Some digging up indicates that the regression was introduced in
bf0abe0ea6cb492810c5b4f9306a19c8afe603bb.

I reproduced the issue quite simply, using the following model/modeladmin:

{{{#!python
class Foo(models.Model):
publication_date = models.DateField()

class FooAdmin(admin.ModelAdmin):
list_display = ['pk', 'publication_date']
list_filter = ['publication_date']
}}}

I created four objects with the dates provided in the original report.

--
Ticket URL: <https://code.djangoproject.com/ticket/21186#comment:3>

Django

unread,
Sep 27, 2013, 6:46:11 PM9/27/13
to django-...@googlegroups.com
#21186: list_filter on a date field is not working as expected
---------------------------------+------------------------------------
Reporter: onlygoldi2201@… | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Baptiste Mispelon <bmispelon@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"8f51ba669aba94eea684ea3f3429fd8e39e70679"]:
{{{
#!CommitTicketReference repository=""
revision="8f51ba669aba94eea684ea3f3429fd8e39e70679"
Fixed #21186: Fixed regression when using date fields in the admin's
list_filter.

Thanks to onlygoldi2201 for the report and to ramiro and apollo13
for the reviews.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21186#comment:4>

Django

unread,
Sep 27, 2013, 6:47:12 PM9/27/13
to django-...@googlegroups.com
#21186: list_filter on a date field is not working as expected
---------------------------------+------------------------------------
Reporter: onlygoldi2201@… | Owner: nobody

Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Baptiste Mispelon <bmispelon@…>):

In [changeset:"c2a35d40db3eca728ac809a3ddb5e8fcec463bca"]:
{{{
#!CommitTicketReference repository=""
revision="c2a35d40db3eca728ac809a3ddb5e8fcec463bca"
[1.6.x] Fixed #21186: Fixed regression when using date fields in the
admin's list_filter.

Thanks to onlygoldi2201 for the report and to ramiro and apollo13
for the reviews.

Backport of 8f51ba669aba94eea684ea3f3429fd8e39e70679 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21186#comment:5>

Django

unread,
Sep 28, 2013, 12:09:28 AM9/28/13
to django-...@googlegroups.com
#21186: list_filter on a date field is not working as expected
---------------------------------+------------------------------------
Reporter: onlygoldi2201@… | Owner: nobody

Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by anonymous):

Replying to [comment:1 ramiro]:


> Thanks for your report.
>
> Which database backend are you using?


I am using MySql.

--
Ticket URL: <https://code.djangoproject.com/ticket/21186#comment:6>

Django

unread,
Sep 28, 2013, 3:57:00 AM9/28/13
to django-...@googlegroups.com
#21186: list_filter on a date field is not working as expected
---------------------------------+------------------------------------
Reporter: onlygoldi2201@… | Owner: nobody

Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by aaugustin):

Whoops, sorry about that. Thanks everyone for the fix.

--
Ticket URL: <https://code.djangoproject.com/ticket/21186#comment:7>

Reply all
Reply to author
Forward
0 new messages