-
Previous Value Current Value Exception when adding new entries "Issue Creation Settings" in service desk
Exception when adding new entrie "Issue Creation Settings" in service desk
-
Previous Value Current Value Open
Closed
-
OneDev tries to evaluate the default value for field
Assigneeswhen adding the issue creation setting. Since there is no project context at this point, your groovy script needs to be improved like below:import io.onedev.server.model.* def project = Project.get() if (project != null) { def owners = project.userAuthorizations.findAll {it->it.role.owner}*.user.name owners += project.groupAuthorizations.findAll {it->it.role.owner}*.group.members.flatten()*.name return owners.unique() } else { return [] // or return some default assignees as necessary } -
OneDev tries to access default value for issue field
Assigneewhen adding the issue creation setting. At this point,Project.get()will returnnull. So you need to improve the groovy script like below:import io.onedev.server.model.* def project = Project.get() if (project != null) { def owners = project.userAuthorizations.findAll {it->it.role.owner}*.user.name owners += project.groupAuthorizations.findAll {it->it.role.owner}*.group.members.flatten()*.name return owners.unique() } else { return [] // or return some default assignees as necessary } -
Previous Value Current Value 5.1.0
empty -
it works, thanks !!
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
Not Found
|
Issue Votes (0)
last settings throw exception in service desk
The only groovy script we have is :