Steps to reproduce
SAK-33428has been applied to the code
- run SakaiScript.jws?wsdl and
- call addNewToolToAllWorkspaces() with a high page position like 99 (to ensure the new tool gets added to the end of the list)
- After the script finishes not all of the sites' new tool will be added to the correct position
In Sakai 10.7 SakaiScript.jws (this code includes the patch in
The variable position overwrites itself and is inside a for loop, so as sites are processed if the numPages happens to be smaller, it will change the position for all subsequent sites to that position and will keep reducing if you happen to have sites with less and less numPages.