Ticket #2532581 (accepted defect)

Reporter


Lewis Diamond
Opened: 07/20/12
Last modified: 11/4/12
Status: accepted
Type: defect

Owner


Eric Ferraiuolo
Target Release: BACKLOG
Priority: P3 (normal)
Summary: A Model's `id` cannot be reset.
Description:

See http://jsfiddle.net/ldiamond/UkPeU/3/

Model.reset() should fire "change" once with all the changed attributes as well as firing "attrChange" for each attr.

Type: defect Observed in Version: 3.5.1
Component: Model Severity: S3 (normal)
Assigned To: Eric Ferraiuolo Target Release: BACKLOG
Location: Library Code Priority: P3 (normal)
Tags: attribute, attributeextras, reset Relates To:
Browsers: N/A
URL:
Test Information:

Change History

Lewis Diamond

Posted: 07/20/12
  • component changed from Model to Attribute
  • keywords changed from model, reset to attribute, attributeextras, reset
  • owner changed from Eric Ferraiuolo to Satyen Desai
  • status changed from new to assigned

Moving to Attribute

Satyen Desai

YUI Developer

Posted: 07/20/12
  • component changed from Attribute to Model
  • location changed to Library Code
  • owner changed from Satyen Desai to Eric Ferraiuolo
  • priority changed to P3 (normal)

The coalesced change event is currently implemented by Model. It hasn't been moved down to Attribute yet (due to the cost of firing 2 events for each single attribute change)

Eric Ferraiuolo

YUI Developer

Posted: 07/23/12
  • status changed from assigned to accepted

So it does actually fire the `change` event on reset, but I think there's bug around the ability to reset `id` properly, and this bug was given the false notion that `reset()` wasn't firing the `change` event.

Eric Ferraiuolo

YUI Developer

Posted: 07/23/12
  • summary changed from Model.reset() does not fire "change" to A Model's `id` cannot be reset.

I updated the summary for to reflect what the underlying bug is.

This seems like an issue with how Model implement its `id` attribute as an alias. The refactor to change this to using proper getter/setter functions will hopefully resolve this issue.

Eric Ferraiuolo

YUI Developer

Posted: 07/23/12
  • milestone changed to 3.NEXT
  • severity changed from S2 (high) to S3 (normal)

Jenny Donnelly

YUI Developer

Posted: 09/19/12
  • milestone changed from 3.NEXT to BACKLOG

Moving from 3.NEXT to BACKLOG.