@@ 28,7 28,7 @@ if len(sys.argv) > 3 or (len(sys.argv) == 2 and sys.argv[1] == "-h"):
# If a dry run, JSON is printed instead of submitted to Redmine.
dry_run = len(sys.argv) == 2 and sys.argv[1] == "-c"
-dry_run = True
+# dry_run = True
if dry_run:
print("Making a dry run! Re-run with -c to commit the import into Redmine.")
else:
@@ 431,9 431,9 @@ def _set_tracker_or_status(c):
w_ids = []
for mid in c["idMembers"]:
if a_id is None:
- a_id = mid
+ a_id = user_map[mid]
else:
- w_ids.append(mid)
+ w_ids.append(user_map[mid])
if a_id is not None:
result["assigned_to_id"] = a_id
@@ 519,7 519,6 @@ def handle_attachments(c):
dry_run_counter = 0
-import_counter = 0
for c in board["cards"]:
if dry_run and dry_run_counter > 0:
print("ENDING DRY RUN")
@@ 651,10 650,9 @@ for c in board["cards"]:
else:
print(str(result))
+ if issue_id > 0:
import_history.append(c["id"])
- import_counter += 1
- if import_counter >= 5:
- write_import_history()
+ write_import_history()
# print("Aborting after one for testing")
# sys.exit(0)