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

Pivotal importer fixes #176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion taiga/importers/management/commands/import_from_jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def add_arguments(self, parser):
parser.add_argument('--project-type', dest="project_type", type=str,
help='Project type in jira: project or board')
parser.add_argument('--template', dest='template', default="scrum",
help='template to use: scrum or scrum (default scrum)')
help='template to use: scrum or kanban (default scrum)')
parser.add_argument('--ask-for-users', dest='ask_for_users', const=True,
action="store_const", default=False,
help='Import closed data')
Expand Down
2 changes: 1 addition & 1 deletion taiga/importers/management/commands/import_from_pivotal.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def add_arguments(self, parser):
parser.add_argument('--project-id', dest="project_id", type=str,
help='Project ID or full name (ex: taigaio/taiga-back)')
parser.add_argument('--template', dest='template', default="scrum",
help='template to use: scrum or scrum (default scrum)')
help='template to use: scrum or kanban (default scrum)')
parser.add_argument('--ask-for-users', dest='ask_for_users', const=True,
action="store_const", default=False,
help='Import closed data')
Expand Down
5 changes: 5 additions & 0 deletions taiga/importers/pivotal/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,11 @@ def _import_comments(self, project_data, obj, story, options):
users_bindings = options.get('users_bindings', {})

for comment in story['comments']:
if not comment.get('person', False):
print(f"Person element is missing in comment {comment['id']} of story {story['id']}, will treat as unknown")
comment['person'] = {}
comment['person']['id'] = '0'
comment['person']['name'] = 'unknown'
if 'text' in comment:
snapshot = take_snapshot(
obj,
Expand Down