[Django] #20781: Regression in form field _has_changed for fields with show_hidden_initial=True

8 views
Skip to first unread message

Django

unread,
Jul 19, 2013, 5:16:54 PM7/19/13
to django-...@googlegroups.com
#20781: Regression in form field _has_changed for fields with
show_hidden_initial=True
----------------------------+------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.6-beta-1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------
Following [892bc91cb0] (affects 1.6.X), the `date_joined` and `last_login`
fields always appear as "Changed" when editing a user in the admin. It
looks like it affects fields with callable defaults. In this case,
`django.forms.fields.Field._has_changed` returns `False` because
`initial_value` is a string and `data_value` is a `datetime`.

I discovered this working on #19019, the
[https://github.com/django/django/pull/1380 PR] contains some TODOs which
could be used as a regression test once this is fixed.

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

Django

unread,
Jul 20, 2013, 4:40:05 PM7/20/13
to django-...@googlegroups.com
#20781: Regression in form field _has_changed for fields with
show_hidden_initial=True
---------------------------------+--------------------------------------

Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.6-beta-1
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 claudep):

* severity: Normal => Release blocker
* cc: claudep (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* stage: Unreviewed => Accepted


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

Django

unread,
Jul 21, 2013, 4:31:06 PM7/21/13
to django-...@googlegroups.com
#20781: Regression in form field _has_changed for fields with
show_hidden_initial=True
---------------------------------+--------------------------------------

Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.6-beta-1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


Comment:

Tim, can you check if this commit fixes your issue:
https://github.com/claudep/django/commit/25a38cf3f66daed8ab17aa33b2955ee4ccde0407

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

Django

unread,
Jul 21, 2013, 8:36:46 PM7/21/13
to django-...@googlegroups.com
#20781: Regression in form field _has_changed for fields with
show_hidden_initial=True
-------------------------------------+-------------------------------------

Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version:
Severity: Release blocker | 1.6-beta-1
Keywords: | Resolution:
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timo):

* stage: Accepted => Ready for checkin


Comment:

It does, thanks for looking into it!

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

Django

unread,
Jul 22, 2013, 3:06:29 AM7/22/13
to django-...@googlegroups.com
#20781: Regression in form field _has_changed for fields with
show_hidden_initial=True
-------------------------------------+-------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: closed

Component: Forms | Version:
Severity: Release blocker | 1.6-beta-1
Keywords: | Resolution: fixed

Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

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


Comment:

In [changeset:"02b0106d43f6997f02cc6785359f8f7519215d3d"]:
{{{
#!CommitTicketReference repository=""
revision="02b0106d43f6997f02cc6785359f8f7519215d3d"
Fixed #20781 -- Fixed _has_changed regression with MultiValueField

Thanks Tim Graham for the report.
}}}

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

Django

unread,
Jul 22, 2013, 3:07:55 AM7/22/13
to django-...@googlegroups.com
#20781: Regression in form field _has_changed for fields with
show_hidden_initial=True
-------------------------------------+-------------------------------------
Reporter: timo | Owner: nobody

Type: Bug | Status: closed
Component: Forms | Version:
Severity: Release blocker | 1.6-beta-1
Keywords: | Resolution: fixed
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"816bf0c6a7a13efb7ae17c9773f984f2dd16fc72"]:
{{{
#!CommitTicketReference repository=""
revision="816bf0c6a7a13efb7ae17c9773f984f2dd16fc72"
[1.6.x] Fixed #20781 -- Fixed _has_changed regression with MultiValueField

Thanks Tim Graham for the report.

Backport of 02b0106d from master.
}}}

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

Reply all
Reply to author
Forward
0 new messages