groovy script. Unable to resolve class io....GroupManager #2845
floris huisman opened 5 days ago

I would like a groovy script that returns the users from a specific group. I had issues with that script, so I figured to at least try the examples at https://docs.onedev.io/appendix/scripting But those also do not seem to be OK.

Copy/paste the first example and then I get

startup failed:
Script_78ccfa6cf4f2a2860174b21663919ba2.groovy: 1: unable to resolve class io.onedev.server.manager.GroupManager
@ line 1, column 1.
import io.onedev.server.manager.GroupManager;
^

What would be the correct way to set this up?

image.png

filing it as a bug as either the docs or the code is not what it should be according to the other.

  • floris huisman commented 5 days ago

    hm ok, just removing the "import" line seems to fix the issue for saving the script. yet to figure out how to use it further.

  • Robin Shen commented 4 days ago

    Doc has been updated. Please also make sure to update 16.0.3

  • Robin Shen changed state to 'Closed' 4 days ago
    Previous Value Current Value
    Open
    Closed
1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
16.0.2
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2845
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover