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 <david@davidnind.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (cherry picked from commit7d9e4cf415) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> (cherry picked from commitc15e5068d0) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit5d360af02c) Signed-off-by: danyonsewell <danyonsewell@catalyst.net.nz> (cherry picked from commit5d360af02c)
This commit is contained in:
parent
234599857e
commit
1e6cf232bf
|
|
@ -1462,7 +1462,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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue