From 5d360af02cab6e89c56fca39d4091f2c3667582f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 28 Apr 2023 14:30:19 -0400 Subject: [PATCH] Bug 32993: Holds priority changed incorrectly with dropdown selector Test Plan: 1) Find record with at least 3 holds. 2) Change first holds priority as 2, Priority is changed to 3. 3) Try to change priority back to 1, Priority is changed to 2. 4) Apply this patch 5) Reload the page 2) Change first holds priority as 2, Priority is changed to 2. 3) Try to change priority back to 1, Priority is changed to 1. Signed-off-by: David Nind Signed-off-by: Emmi Takkinen Signed-off-by: Hinemoea Viault Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 7d9e4cf41515234d8d61c369aab3c3e49be1ac3d) Signed-off-by: Matt Blenkinsop (cherry picked from commit c15e5068d0f13ed8a8b105ea1ed795030be6c269) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 3a63e8ea5a..04ec113eba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -1487,7 +1487,7 @@ var value = parseInt($(this).val()); var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found if( !isNaN(value) ) { //If moved to 'del' - var after = row.parent().find("tr:nth-child("+(value+1+found_holds )+")"); //Go to the row 1 after the new value (and skip found holds) + var after = row.parent().find(`tr:nth-child(${value+found_holds})`); //Go to the row 1 after the new value (and skip found holds) if (prev_rank_request > value) { row.insertBefore(after); } else { -- 2.39.5