summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2024-06-06 20:17:46 +0200
committerPatrick Donnelly <pdonnell@redhat.com>2024-06-06 20:19:53 +0200
commit67956d065d322d497ba1d4a39ed6b7c8b7f963be (patch)
tree1d4c462ca4fdb71cda7832054cee37f991d4c1e9
parentMerge PR #57879 into main (diff)
downloadceph-67956d065d322d497ba1d4a39ed6b7c8b7f963be.tar.xz
ceph-67956d065d322d497ba1d4a39ed6b7c8b7f963be.zip
script/ceph-backport: lookup "Release" custom_field by id
Right now the script assumes the Release custom_field will be ordered first in the array from the REST API. Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
-rwxr-xr-xsrc/script/ceph-backport.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh
index 4854edff8b3..051e0b688c5 100755
--- a/src/script/ceph-backport.sh
+++ b/src/script/ceph-backport.sh
@@ -1580,7 +1580,7 @@ else
fi
debug "Looking up release/milestone of $redmine_url"
-milestone="$(echo "$remote_api_output" | jq -r '.issue.custom_fields[0].value')"
+milestone="$(echo "$remote_api_output" | jq -r '.issue.custom_fields[] | select(.id == 16) | .value')"
if [ "$milestone" ] ; then
debug "Release/milestone: $milestone"
else