{ "id": "78669", "key": "TIMOB-4869", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11363", "description": "Mobile 1.8.0 M10", "name": "Sprint 2011-31", "archived": true, "released": true, "releaseDate": "2011-08-08" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-08-04T17:36:40.000+0000", "created": "2011-08-02T14:24:51.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "attribute", "drillbit", "element", "tagName", "xml" ], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [], "assignee": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-08-04T17:43:08.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Steps to Reproduce:\r\n1. Run drillbit Ti.XML test\r\n\r\nActual Result:\r\nxmlElement\tfalse\t942\tshould be: \"dessert\", was: \"undefined\"\r\n\r\nExpected Result:\r\nShould pass", "attachment": [ { "id": "22235", "filename": "element.xml", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-04T14:30:03.000+0000", "size": 628, "mimeType": "text/xml" }, { "id": "22236", "filename": "elementNS.xml", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-04T14:30:03.000+0000", "size": 748, "mimeType": "text/xml" }, { "id": "22234", "filename": "xml.js", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-04T14:30:03.000+0000", "size": 40817, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "iOS: Titanium.XML.Element tagName attribute is returning undefined", "creator": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Drillbit iOS with 1.8.0.a3b9281", "comment": { "comments": [ { "id": "161964", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Talked with Natalie on this. Turns out the confusion is that, by spec, getElementsByTagName returns a nodelist, not an element ( http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-745549614 ). Nodelist does not have a tagname, only length and items ( http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-536297177 ). The test, as such, should check for the tagName of an item within the nodelist results of getElementsByTagName.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-04T17:35:38.000+0000", "updated": "2011-08-04T17:35:38.000+0000" }, { "id": "161966", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Turns out that the test was looking at the wrong object of the wrong type, which does not nor should not have a tagName attribute.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-04T17:36:40.000+0000", "updated": "2011-08-04T17:36:40.000+0000" }, { "id": "161969", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Works when calling valueOf(elements.item(0).tagName).shouldBe(\"dessert\")", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-04T17:43:08.000+0000", "updated": "2011-08-04T17:43:08.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }