main
ROOT /
pages /
assign-issues-to-module-leader.md
34 lines | ISO-8859-1 | 1 KB

Usage Scenario

Add custom field Module and assign issue of particular module to module leader automatically

How to Set Up

  1. Add custom issue field Module from issue setting of administration menu:

    Default Assignee Module

  2. Define a groovy script to return corresponding module leader based on module name

    Default Assignee Groovy Script Script content is as below:

    import io.onedev.server.util.EditContext
    
    def moduleLeaders = ["Front End":"tommy", "Back End":"jerry"]
    def editContext = EditContext.get()
    
    def defaultAssignee
    
    if (editContext != null)
    	defaultAssignee = moduleLeaders[editContext.getInputValue("Module")]
    
    if (defaultAssignee != null)
    	return [defaultAssignee]
    else
    	return []
    
  3. Modify custom issue field Assignee to use groovy script defined above as default value:

    Default Assignee Default Value

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