Fix the lookup of email ID

This commit is contained in:
Cody Cook 2025-01-22 13:00:19 -08:00
commit 6be1bc0539

View file

@ -58,9 +58,12 @@ fi
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# STEP E: Ask for the new user's **account ID** # STEP E: Ask for the new user's **account ID**
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Because Cloud requires accountId to assign a lead, prompt for accountId read -p "Enter the new user's email address: " new_user_email
# (not a username). user_search_json=$(curl -s -G -u "$username:$api_token" \
read -p "Enter the new user's account ID: " new_account_id --data-urlencode "query=$new_user_email" \
"$jira_base_url/rest/api/3/users/search")
new_account_id=$(echo "$user_search_json" | jq -r '.[0].accountId')
# Create a folder named after the old display name for history and logs # Create a folder named after the old display name for history and logs
mkdir -p "$old_display_name" mkdir -p "$old_display_name"