Fix unicodes
This commit is contained in:
parent
67f9997fcb
commit
8e5b6acad8
1 changed files with 9 additions and 9 deletions
|
@ -21,9 +21,9 @@ raw_data=$(curl -s -X GET \
|
|||
# -----------------------------------------------------------------------------
|
||||
# STEP B: Create a mapping of each component's ID, name, and lead info
|
||||
# -----------------------------------------------------------------------------
|
||||
# For display, we’ll store “leadDisplayName” and “leadAccountId”.
|
||||
# We’ll store the “leadAccountId” in the field `assignee` to mirror the old script,
|
||||
# but be aware that it’s really the account ID in Jira Cloud.
|
||||
# For display, we'll store "leadDisplayName” and "leadAccountId”.
|
||||
# We'll store the "leadAccountId” in the field `assignee` to mirror the old script,
|
||||
# but be aware that it's really the account ID in Jira Cloud.
|
||||
component_data=$(echo "$raw_data" \
|
||||
| jq -r '.[]
|
||||
| { id: .id,
|
||||
|
@ -35,10 +35,10 @@ component_data=$(echo "$raw_data" \
|
|||
|
||||
# -----------------------------------------------------------------------------
|
||||
# STEP C: Show a comma-separated list of lead **display names**
|
||||
# and ask which “username” we want to replace
|
||||
# and ask which "username” we want to replace
|
||||
# -----------------------------------------------------------------------------
|
||||
# NOTE: In Jira Cloud, “username” is replaced by “accountId”.
|
||||
# But to preserve the same “prompt” style, we’ll list display names.
|
||||
# NOTE: In Jira Cloud, "username” is replaced by "accountId”.
|
||||
# But to preserve the same "prompt” style, we'll list display names.
|
||||
usernames=$(echo "$raw_data" \
|
||||
| jq -r '[.[].lead.displayName]
|
||||
| unique
|
||||
|
@ -56,7 +56,7 @@ if ! echo "$usernames" | grep -qw "$old_display_name"; then
|
|||
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
|
||||
# (not a username).
|
||||
|
@ -67,7 +67,7 @@ mkdir -p "$old_display_name"
|
|||
history_file="$old_display_name/history.txt"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# STEP F: Identify components where the existing lead’s display name
|
||||
# STEP F: Identify components where the existing lead's display name
|
||||
# matches the one we want to replace
|
||||
# -----------------------------------------------------------------------------
|
||||
components_to_update=""
|
||||
|
@ -93,7 +93,7 @@ for component in $components_to_update; do
|
|||
fi
|
||||
|
||||
# Note that in Jira Cloud, you must specify "leadAccountId" in the body
|
||||
# to change a component’s lead. "leadUserName" is ignored/invalid in Cloud.
|
||||
# to change a component's lead. "leadUserName" is ignored/invalid in Cloud.
|
||||
curl -s -X PUT \
|
||||
-u "$username:$api_token" \
|
||||
-H "Content-Type: application/json" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue