Fix the lookup of email ID
This commit is contained in:
parent
8e5b6acad8
commit
6be1bc0539
1 changed files with 6 additions and 3 deletions
|
@ -58,9 +58,12 @@ fi
|
|||
# -----------------------------------------------------------------------------
|
||||
# STEP E: Ask for the new user's **account ID**
|
||||
# -----------------------------------------------------------------------------
|
||||
# Because Cloud requires accountId to assign a lead, prompt for accountId
|
||||
# (not a username).
|
||||
read -p "Enter the new user's account ID: " new_account_id
|
||||
read -p "Enter the new user's email address: " new_user_email
|
||||
user_search_json=$(curl -s -G -u "$username:$api_token" \
|
||||
--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
|
||||
mkdir -p "$old_display_name"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue