Last active
June 17, 2020 10:47
-
-
Save CorneAussems/ff9c4834ebd1e76e922520fe7f9dc4ce to your computer and use it in GitHub Desktop.
Valamis Miller bulk javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################ | |
# Step 0: Open on Miller page the Javascript console # | |
############################################################ | |
############################################################ | |
# Step 1 : Find first 50 records with only 1 select option # | |
############################################################ | |
counter=0; | |
$('select').each(function() { | |
if(this.length==1){ | |
counter++; | |
if(counter>0&&counter<=50){ | |
$(this).parent().parent().find(":checkbox").each(function() { | |
if( $(this).attr('data-ng-model')!='task.toHide' ){ | |
$(this).click(); | |
} | |
}); | |
} | |
} | |
}); | |
######################################################################## | |
# Step 2 : Find specific issues and select item counting from 1 to 10 # | |
######################################################################## | |
issue="GEN-190"; | |
select_item=1; | |
counter=0; | |
$('tr td:first-child').each(function(index,value) { | |
if($(this).text()==issue){ | |
counter++; | |
console.log($(this).text()+"-"+counter); | |
$(this).parent().find('select>option:eq('+--select_item+')').prop('selected', true); | |
$(this).parent().find(":checkbox").each(function() { | |
if( $(this).attr('data-ng-model')!='task.toHide' ){ | |
$(this).click(); | |
} | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment