Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Pivotal Tracker Importer fails if user created Custom Fields exist #94

Open
2 tasks done
st-kep opened this issue Jan 28, 2025 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@st-kep
Copy link

st-kep commented Jan 28, 2025

Do I have the most recent api-cookbook code?

  • I am using the latest code available on the main branch of the api-cookbook repo.

Is there an existing issue for this?

  • I have searched the existing issues.

Current Behavior

If you create a Custom Field in the Shortcut GUI, then attempt to import a Pivotal Tracker the import fails with the following error message. ({Path} replaces real path)

Traceback (most recent call last):
  File "/{Path}/api-cookbook/pivotal-import/initialize.py", line 587, in <module>
    sys.exit(main(sys.argv))
  File "/{Path}/api-cookbook/pivotal-import/initialize.py", line 572, in main
    cfg = load_config()
  File "/{Path}/api-cookbook/pivotal-import/lib.py", line 448, in load_config
    return validate_config(populate_config())
  File "/{Path}/api-cookbook/pivotal-import/lib.py", line 344, in populate_config
    priority_custom_field_id = default_priority_custom_field_id()
  File "/{Path}/api-cookbook/pivotal-import/lib.py", line 289, in default_priority_custom_field_id
    if custom_field["canonical_name"] == "priority" and custom_field["enabled"]:
KeyError: 'canonical_name'
make: *** [Makefile:19: initialize] Error 1

Dumping the custom_field variable shows that for user created Custom Field, the "canonical_name" field does not exist.

Expected Behavior

The Pivitol Tracker importer is able to import Pivitol Tracker exports after a Shortcut Custom Field is created.

Minimal Reproducible Example

  • Manually create a Custom Field in Shortcut
  • Execute the importer initialization of the Pivotal Tracker importer.

Environment

  • Operating system: Ubuntu/Windows
  • Python/JavaScript version: Python 3.10

Further Information

The workaround to continue evaluating the imported that I used was to move the custom_field["enabled"] check before the custom_field["canonical_name"] == "priority" check and disable the custom fields I created in the GUI. Then I was able to execute the import.

@st-kep st-kep added the bug Something isn't working label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant