Skip to content

Commit

Permalink
Merge pull request #406 from WildMeOrg/fix-send-all-locations-import-id
Browse files Browse the repository at this point in the history
Make sure to only iterate selected location IDs for bulk import re-ID
  • Loading branch information
holmbergius committed Mar 11, 2024
2 parents c82c789 + 32bcd1a commit 1b84418
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/webapp/import.jsp
Expand Up @@ -824,15 +824,16 @@ try{
function resendToID() {
if (!confirmCommitID()) return;
$('#ia-send-div').hide().after('<div id="ia-send-wait"><i>sending... <b>please wait</b></i></div>');
var locationIds = $('#id-locationids').val();
//var locationIds = $('#id-locationids').val();
var locationIds = '';
$("#id-locationids > option").each(function(){
$("#id-locationids option:selected").each(function(){
locationIds+='&locationID='+this.value;
});
if(locationIds.indexOf('ALL locations')>-1)locationIds='';
//if (locationIds && (locationIds.indexOf('') < 0)) data.taskParameters.matchingSetFilter = { locationIds: locationIds };
console.log('resendToID() SENDING: locationIds=%o', locationIds);
$.ajax({
url: wildbookGlobals.baseUrl + '/appadmin/resendBulkImportID.jsp?importIdTask=<%=taskId%>'+locationIds,
dataType: 'json',
Expand All @@ -847,6 +848,7 @@ try{
}
}
});
}
</script>
Expand Down

0 comments on commit 1b84418

Please sign in to comment.