main
ROOT /
pages /
assign-issues-to-project-ownes.md
25 lines | ISO-8859-1 | 724 bytes

Usage Scenario

Assign issues to project owners by default

How to Set Up

  1. Define a groovy script to return project owners

    Groovy Script Content of the script is as below:

    import io.onedev.server.model.*
    
    def project = Project.get()
    
    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()
    
  2. Modify custom issue field Assignee to use groovy script defined above as default value:

    Assignee Default Value

Please wait...
Page is in error, reload to recover