Hi,
i created a custom field (radiobutton), based on the users choise i would like to set the assignee! Can i use Script runner for this setup?
grtz
Rachid
Daryal,
how do I link the radiobutton value with the case, because the case depends on the value of the radiobuton.
grtz
Rachid
yes. is this going to be part of a workflow transition? You can write a small post function to accomplish this or fire an event on this transition which you can catch in the listener to get the value of the custom field , perform your logic and set the assignee.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should not be a part of the workflow! Can I work this out with scriptrunner?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, this use case is perfect for scriptrunner. You would need basic groovy to figure this out in less than 10 lines (See scriptrunner documentation for a bunch of awesome examples and code snippets.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hx for the feedback!
This is my script, but how can I get de value of a radiobutton from a custom field?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
String userName;
switch(ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Afdeling").toString()){
case "AB": userName = "Sam";break;
case "CD": userName = "Sam";break;
case "EF": userName = "Peter";break;
case "GH": userName = "Peter";break;
}
issue.setAssignee(ComponentAccessor.getUserManager().getUserByName(userName))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
def customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(<10301L>);
final Object customFieldValue = issue.getCustomFieldValue(customField)
something like this to get the custom field by id.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Rachid Amajoud,
yes, Using scripted post function you can do this. you need to capture the value of the radio button field and set the assignee.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.