{ "id": "160065", "key": "ALOY-1497", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-03-09T21:35:55.000+0000", "created": "2016-05-05T17:20:41.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "alloy", "models" ], "versions": [ { "id": "18001", "name": "Release 5.2.2", "archived": false, "released": true, "releaseDate": "2016-06-28" } ], "issuelinks": [], "assignee": null, "updated": "2018-03-07T22:28:26.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13605", "name": "Models" } ], "description": "h3. Test case from alloy sample sql_no_migrations. Replace index.js with the attached file\r\n\r\n\r\nsteps to reproduce:\r\n\r\n- touch label at top bar to add an item as many times as you want\r\n- touch the added item \r\n- run the app again\r\n-touch any item\r\n-touch label at top bar\r\n- see the logs\r\n\r\n\r\nExpected:\r\n\r\nThe expected log is to see only the secondTestField change. 'changed secondTestField expected secondTestField'\r\n\r\nResult:\r\nAfter running again the app and touching the top label the log is the following: 'changed firstTestFieldexpected secondTestField'\r\n\r\n", "attachment": [ { "id": "59154", "filename": "index.js", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-05T17:20:43.000+0000", "size": 1129, "mimeType": "application/javascript" }, { "id": "59155", "filename": "testCase.zip", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-05T19:33:12.000+0000", "size": 10478089, "mimeType": "application/zip" } ], "flagged": false, "summary": "Alloy model - filtered change event fires with any attribute", "creator": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "384893", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, The code you provided for regenerating the issue is not sufficient enough. Replacing the index.js with the attached index.js shows the below error\r\n{code}\r\n[ERROR] : Error: Requested module not found: alloy/models/Thing\r\n[ERROR] : File: app.js\r\n[ERROR] : Line: undefined\r\n[ERROR] : SourceId: undefined\r\n[ERROR] : Backtrace:\r\n[ERROR] : undefined\r\n{code}\r\n\r\nPlease provide a full reproducible test code. \r\n\r\nRegards,\r\nSharif.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-05-05T19:26:36.000+0000", "updated": "2016-05-05T19:26:36.000+0000" }, { "id": "384894", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "body": "That's because I started from a sample project. I've attached the whole project. Thanks", "updateAuthor": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-05T19:33:27.000+0000", "updated": "2016-05-05T19:33:27.000+0000" }, { "id": "385324", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I tried to test your issue. I was able to reproduce the issue. I found the following log on second run in ios. I follow instruction as \r\n\r\nrun the app again\r\n-touch any item(I touched twice)\r\n-touch label at top bar\r\nsee the logs\r\n\r\n{code}\r\n[INFO] : sha135/1.0 (5.2.2.b685ddb)\r\n[INFO] : changed\r\n[INFO] : {\r\n[INFO] : changes = {\r\n[INFO] : secondTestField = 1;\r\n[INFO] : };\r\n[INFO] : }\r\n[INFO] : changed secondTestFieldexpected secondTestField\r\n[INFO] : changed\r\n[INFO] : {\r\n[INFO] : changes = {\r\n[INFO] : secondTestField = 1;\r\n[INFO] : };\r\n[INFO] : }\r\n[INFO] : changed secondTestFieldexpected secondTestField\r\n[INFO] : changed in save\r\n[INFO] : {\r\n[INFO] : changes = {\r\n[INFO] : firstTestField = 1;\r\n[INFO] : };\r\n[INFO] : }\r\n[INFO] : changed firstTestFieldexpected secondTestField\r\n{code}\r\n\r\nRegards,\r\nSharif.\r\n\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-05-10T19:52:18.000+0000", "updated": "2016-05-10T19:54:09.000+0000" }, { "id": "385326", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks, as you can see the last log should be 'changed secondTestFieldexpected secondTestField' as the above ones but instead it is 'changed firstTestFieldexpected secondTestField' when the change event is binded only to secondTestField.\r\n\r\nRegards,", "updateAuthor": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-10T20:06:31.000+0000", "updated": "2016-05-10T20:06:31.000+0000" }, { "id": "410610", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Please add to config.json {{\"backbone\": \"1.1.2\"}} and use [model.changedAttributes|http://backbonejs.org/#Model-changedAttributes] in the change event callback to retrieve a hash of only the model's attributes that have changed.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-03-09T21:35:38.000+0000", "updated": "2017-03-09T21:35:38.000+0000" }, { "id": "435338", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid. If this is incorrect, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-07T22:28:26.000+0000", "updated": "2018-03-07T22:28:26.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }