Hello,
I wish set automatically the approvers based on another customfield (DropDown List)
I put the following script in the Behavior:
when i test as a jira agent from the portal , the script works correctly and the user is setted in the approver field
But when i test as a customer from the portal , nothing happen and the approver field is still empty.
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField
@BaseScript FieldBehaviours fieldBehaviours
def customefield = getFieldById(getFieldChanged())
def Approvers = getFieldByName("Approvers")
Approvers.setFormValue(null)
switch (customefield.getValue()) {
case "A":
Approvers.setFormValue(["user1"])
break
case "B":
Approvers.setFormValue(["user2"])
break
}
Please Help
The customers in the instance does not have a browse permission to the project and therefore they won't have access to the user list or even @ mention users.
You have to find another way like creating your own dropdown but with multi-select list and process that internally.
Refer to this answer.
Thank you for the quick reply
But I already give the customer the permission to search in the project
Did i misunderstood something ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@brbojorque And as a customer , he can search for users.
So if he can add/ browse users in the approvers field from his side , i can from my side set the list of approvers i need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.