Mantis import stopped on field 'Reproducibility'

Hi, we think about switching our OS-project from Mantis (V1.2.5) to YouTrack but we get stuck during importing on a testsystem. Can someone point me in the right direction how to solve this issue? Thanks in advance!

Importing users finished
Creating custom fields definitions
Processing custom field with name [ priority ]
Processing custom field with name [ severity ]
Processing custom field with name [ category ]
Processing custom field with name [ version ]
Processing custom field with name [ fixed_in_version ]
Processing custom field with name [ build ]
Processing custom field with name [ platform ]
Processing custom field with name [ os ]
Processing custom field with name [ os_build ]
Processing custom field with name [ due_date ]
Processing custom field with name [ Reproducibility ]
Traceback (most recent call last):
  File "mantis2youtrack.py", line 455, in <module>
    main()
  File "mantis2youtrack.py", line 25, in main
    mantis_port, mantis_login, mantis_pass, mantis_product_names)
  File "mantis2youtrack.py", line 322, in mantis2youtrack
    value_sets.update(create_custom_fields(target, u"Reproducibility", mantis.REPRODUCIBILITY_VALUES.values()))
  File "mantis2youtrack.py", line 173, in create_custom_fields
    return create_yt_cfs_with_values(connection, yt_cf_names, mantis_field_values, attach_bundle_policy, auto_attach)
  File "mantis2youtrack.py", line 149, in create_yt_cfs_with_values
    cf_name, auto_attach, yt_field_values, attach_bundle_policy)
  File "H:\Download\youtrack-python-api-3.0.2-44\python\youtrack\importHelper.py", line 55, in create_custom_field
    [connection.addValueToBundle(bundle, name) for name in values_to_add]
  File "H:\Download\youtrack-python-api-3.0.2-44\python\youtrack\connection.py", line 605, in addValueToBundle
    return self._put(request)
  File "H:\Download\youtrack-python-api-3.0.2-44\python\youtrack\connection.py", line 64, in _put
    return self._reqXml('PUT', url, '<empty/>\n\n')
  File "H:\Download\youtrack-python-api-3.0.2-44\python\youtrack\connection.py", line 46, in _reqXml
    response, content = self._req(method, url, body, ignoreStatus)
  File "H:\Download\youtrack-python-api-3.0.2-44\python\youtrack\connection.py", line 39, in _req
    raise youtrack.YouTrackException(url, response, content)
youtrack.YouTrackException: Error for [/admin/customfield/bundle/Reproducibility_bundle/N%2FA]: 400: Bad Request

11 comments
Comment actions Permalink

ok, got this sorted by changing to another system but a new one come up:

Processing custom field with name [ due_date ]
Processing custom field with name [ Reproducibility ]
Traceback (most recent call last):
  File "mantis2youtrack.py", line 455, in <module>
    main()
  File "mantis2youtrack.py", line 25, in main
    mantis_port, mantis_login, mantis_pass, mantis_product_names)
  File "mantis2youtrack.py", line 332, in mantis2youtrack
    bundle = field.bundle
AttributeError: 'CustomField' object has no attribute 'bundle'

0
Comment actions Permalink

Hello, Olivia!

What mapping are you using for mantis import?

0
Comment actions Permalink

Hi Anna, I'm using the defaultMantis.py without changes.

0
Comment actions Permalink

Do you have reproducibility field in YouTrack now? If you do, can you remove it and try to run import again?

Also, what system did you tried first (when you got an exception from your first message)? We need to know it to reproduce the problem and fix the issue.

0
Comment actions Permalink

yes, the field is imported. Deleting (even all fields) doesn't help, the error is still occuring whatever I try.

Import is running now on a Debian Lenny with Python 2.6.4 and 2.7.2. The former testimport was started on a Win7 x64 with Python 2.7.2. Mantis was running 1.2.5 and 1.2.8.

Edit: tried py2.7.2 too but same issue



Attachment(s):
Custom Fields Configuration YouTrack - Google Chrome_2011-11-01_11-30-17.png
Custom Fields Configuration YouTrack - Google Chrome_2011-11-01_11-20-22.png
0
Comment actions Permalink

Thabk you very much for your answers. I'll investigate this issue and let you know when it is fixed. Also, I've created an issue in YouTrack about your problem : http://youtrack.jetbrains.net/issue/JT-11760

0
Comment actions Permalink

Thanks Anna! If I can help with infos, logs, testing or whatever, please let me know.

0
Comment actions Permalink
thought I give youtrack another chance but still, the import is failing on 4.0 with the same problem.
Tried the posted workaround http://youtrack.jetbrains.com/issue/JT-11760#comment=27-274667
but that ends up in

Processing custom field with name [ subproject ]
Processing custom field with name [ handler ]
Traceback (most recent call last):
  File "mantis2youtrack.py", line 456, in <module>
    main()
  File "mantis2youtrack.py", line 25, in main
    mantis_port, mantis_login, mantis_pass, mantis_product_names)
  File "mantis2youtrack.py", line 359, in mantis2youtrack
    custom_fields = client.get_mantis_custom_fields(project_ids)
  File "/home/youtrack/python/mantis/mantisClient.py", line 78, in get_mantis_custom_fields
    ids = ids | set(self._calculate_project_ids(project_id))
  File "/home/youtrack/python/mantis/mantisClient.py", line 239, in _calculate_project_ids
    result = self._get_child_projects_by_project_id(project_id)
  File "/home/youtrack/python/mantis/mantisClient.py", line 248, in _get_child_projects_by_project_id
    cursor.execute(request)
  File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 174, in execute
  File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
_mysql_exceptions.OperationalError: (1054, "Unknown column 'None' in 'where clause'")
0
Comment actions Permalink
Same as Olivia 92: I'd like to switch from mantis to youtrack but I got stuck again at the migration script which throws the following error:

Processing custom field with name [ Reproducibility ]
Traceback (most recent call last):
  File "mantis2youtrack.py", line 455, in <module>
    main()
  File "mantis2youtrack.py", line 25, in main
    mantis_port, mantis_login, mantis_pass, mantis_product_names)
  File "mantis2youtrack.py", line 332, in mantis2youtrack
    bundle = field.bundle
AttributeError: 'CustomField' object has no attribute 'bundle'

after applying the workaround described in http://youtrack.jetbrains.com/issue/JT-11760#comment=27-274667 the following error occurred somewhere after processing the Reproducibility field (so apparently this solved something):
Creating project [ 3 ] with name [ PIS ]
Importing components to project [ 3 ]
Traceback (most recent call last):
  File "mantis2youtrack.py", line 455, in <module>
    main()
  File "mantis2youtrack.py", line 25, in main
    mantis_port, mantis_login, mantis_pass, mantis_product_names)
  File "mantis2youtrack.py", line 377, in mantis2youtrack
    lambda component, yt_bundle, value_mapping:
  File "mantis2youtrack.py", line 267, in add_values_to_fields
    add_values_to_bundle_safe(connection, bundle, yt_values)
  File "c:\Python27\Scripts\youtrack_migration\youtrack\importHelper.py", line 145, in add_values_to_bundle_safe
    raise e
youtrack.YouTrackException: Error for http://forum.jetbrains.com/admin/customfield/ownedFieldBundle/PIS%20Subsystems/?: 500: Internal Server Error

I'm using the following versions for running the script:
  • Windows 7 64 bit
  • Python 2.7.2
  • Mysql 5.1
  • Mantis 1.2.11 (schema version 183)

I would really like to give youtrack a shot but I definitely spent too much time debugging this script already.
0
Comment actions Permalink
Hello, endif!
I understand your problem, and I definitely understand your co,plains about wasting time. If you want, I can do import process for you.
Also, what YouTrack version are you using?
0
Comment actions Permalink
Hello, Anna!
I have the same error as in post above
youtrack.YouTrackException: Error for http://forum.jetbrains.com/admin/customfield/ownedFieldBundle/PIS%20Subsystems/?: 500: Internal Server Error

Do you have any solution how to proceed?
0

Please sign in to leave a comment.