https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33430
Lucas Gass <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Lucas Gass <[email protected]> --- For testing purposes in koha-testing-docker I wrote this. Definitely DO NOT add this to a production server: $('body').append('<button id="makeSuggestions">Make 100 suggestions</button>'); $('#makeSuggestions').click( function() { for (let i = 0; i < 100; i++) { let branches = ["CPL", "FFL","FPL","FRL","IPT","LPL","MPL","PVL","RPL","SPL","TPL","UPL"]; let random_branch = Math.floor(Math.random() * branches.length); let statuses = ["ASKED", "ACCEPTED", "REJECTED"]; let random_status = Math.floor(Math.random() * statuses.length); let random_title = (Math.random() + 1).toString(36).substring(2); $.ajax({ url: '/api/v1/suggestions', method: 'POST', data: JSON.stringify({ "title": random_title, "item_type": "BK", "suggested_by": Math.floor(Math.random() * 51), "suggestion_date": "2023-04-06", "timestamp": "2023-04-06T17:59:26+00:00", "managed_by": 51, "library_id": branches[random_branch], "status": statuses[random_status], }), contentType: 'application/json', success: function(result) { console.log('suggestion added'); }, }); } }); -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
