73169097327bcbfca570a98a34076c25ac069270
braney
  Fri Apr 24 08:08:52 2026 -0700
redmineCli: fix resolve_status crash when --status defaults to int

The default for create's --status is the int STATUS_NEW=1. Without
type=int on the argparse option, resolve_status received an int and
crashed on name_or_id.isdigit(). Wrap in str() to match resolve_tracker.

diff --git src/utils/redmineCli src/utils/redmineCli
index 82cec7b9e51..a147c7c427a 100755
--- src/utils/redmineCli
+++ src/utils/redmineCli
@@ -269,33 +269,33 @@
 
 
 def resolve_user(name_or_id):
     """Resolve a user name or numeric ID to a Redmine user ID."""
     if name_or_id.isdigit():
         return int(name_or_id)
     key = name_or_id.lower().strip()
     if key in USER_IDS:
         return USER_IDS[key]
     sys.exit(f"Error: unknown user '{name_or_id}'. "
              "Run 'redmineCli users' to see available names and IDs.")
 
 
 def resolve_status(name_or_id):
     """Resolve a status name to a Redmine status ID. Accepts name or numeric ID."""
-    if name_or_id.isdigit():
+    if str(name_or_id).isdigit():
         return int(name_or_id)
-    key = name_or_id.lower().strip()
+    key = str(name_or_id).lower().strip()
     if key in STATUS_IDS:
         return STATUS_IDS[key]
     sys.exit(f"Error: unknown status '{name_or_id}'. Known statuses: "
              + ", ".join(sorted(k for k in STATUS_IDS if " " in k or not any(
                  k2 != k and STATUS_IDS[k2] == STATUS_IDS[k] for k2 in STATUS_IDS))))
 
 
 def resolve_version(name_or_id, project_id, base_url, api_key):
     """Resolve a version name or numeric ID to a Redmine fixed_version_id.
 
     Name lookup is tried first (case-insensitive, exact match preferred, else
     unique substring). Only falls through to treating the input as a literal
     ID if it is purely digits and no name matched. This matters because
     Redmine version names are often numeric (e.g. "497") and differ from
     their internal IDs.