]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script/ceph-backport: lookup "Release" custom_field by id 57919/head
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 6 Jun 2024 18:17:46 +0000 (14:17 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 6 Jun 2024 18:19:53 +0000 (14:19 -0400)
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>
src/script/ceph-backport.sh

index 4854edff8b36895544fc4abb05733dab8ed30edb..051e0b688c54d51b1dd00f364b24c7f3db6feb86 100755 (executable)
@@ -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