Problem importing from bugzilla

  • 0
  • 2

Hi All,

I am trying to import issues from bugzilla (3.0) to Utrack (5.2.2), using the bugzilla2youtrack.py script

The script connects to the bugzilla db and starts reading the data, but when it gets to the custom fields part it fails ( see the traceback at the end of this post ). I have only one custom field in the bugzilla db, with type = 1. I guess I'm supposed to map it somehow but I can't figure out how.

Please help!

Many thanks,

Oren

Traceback of bugzilla2youtrack.py below:


All projects will be imported. Are you sure? [y/n]y
bz_product_names : ['admin tasks', 'AnalystTools', 'Data Network', 'IT Requests', 'Product Support', 'Report Templates & Reportlets', 'Resource Generation']
Creating issue link types
Creating issue link types finished
Creating custom fields
Traceback (most recent call last):
File "./bugzilla2youtrack.py", line 355, in <module>
main()
File "./bugzilla2youtrack.py", line 36, in main
bz_product_names, lambda issue: True)
File "./bugzilla2youtrack.py", line 273, in bugzilla2youtrack
create_yt_custom_field(cf, target)
File "./bugzilla2youtrack.py", line 187, in create_yt_custom_field
create_custom_field(target, cf_type, cf_name, True)
File "/home/oren/youtrack/youtrack-rest-python-library-master/python/youtrack/importHelper.py", line 37, in create_custom_field
_create_custom_field_prototype(connection, cf_type, cf_name, auto_attached)
File "/home/oren/youtrack/youtrack-rest-python-library-master/python/youtrack/importHelper.py", line 4, in _create_custom_field_prototype
field = _get_custom_field(connection, cf_name)
File "/home/oren/youtrack/youtrack-rest-python-library-master/python/youtrack/importHelper.py", line 15, in _get_custom_field
existing_fields = [item for item in connection.getCustomFields() if item.name.encode('utf-8').lower() ==
File "/home/oren/youtrack/youtrack-rest-python-library-master/python/youtrack/connection.py", line 743, in getCustomFields
e.nodeType == Node.ELEMENT_NODE]
File "/home/oren/youtrack/youtrack-rest-python-library-master/python/youtrack/connection.py", line 737, in getCustomField
 return youtrack.CustomField(self._get("/admin/customfield/field/" + urlquote(name.encode('utf-8')
)), self)
File "/home/oren/youtrack/youtrack-rest-python-library-master/python/youtrack/__init__.py", line 394, in __init__
YouTrackObject.__init__(self, xml, youtrack)
File "/home/oren/youtrack/youtrack-rest-python-library-master/python/youtrack/__init__.py", line 55, in __init__
self._update(xml)
File "/home/oren/youtrack/youtrack-rest-python-library-master/python/youtrack/__init__.py", line 66, in _update
self._updateFromAttrs(xml)
File "/home/oren/youtrack/youtrack-rest-python-library-master/python/youtrack/__init__.py", line 70, in _updateFromAttrs
if el.attributes is not None:
AttributeError: 'str' object has no attribute 'attributes'