From 67956d065d322d497ba1d4a39ed6b7c8b7f963be Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 6 Jun 2024 14:17:46 -0400 Subject: [PATCH] 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 --- src/script/ceph-backport.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh index 4854edff8b368..051e0b688c54d 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 -- 2.39.5