Can we set default value of Group Picker (Single) field on Incoming Side

Originally asked by Neha Aggarwal on 06 February 2020 (original question)


Hello,

Can we set default value of Group Picker (Single) field on Incoming Side.

We don’t have Group Picker (Single) field on Outgoing Side

But on Incoming side, It is must to set the value of that field. (Because of some automation rules)

Is there anyway to set default value on Incoming side.

Source Instance : JIRA Server

Destination Instance : JIRA Service desk (JIRA Server)

Regards,


Answer by André Leroy-Beaulieu Castro on 06 February 2020

Hi Neha,

Thanks for contributing to our community site :smile:

Here is how you would accomplish this:

Incoming Sync:

def group = com.atlassian.jira.component.ComponentAccessor.getGroupManager().getGroup("group-name") // Get the group you want to set on your custom field
issue.customFields."Group Picker CF".value = [group] // Use your actual custom field name or id
  • Make sure to change .getGroup(“group-name”) to the actual name of the group you want to set as a default
  • Change “Group Picker CF” to the actual name of your Group Picker custom field.

Let me know how this goes!

Thanks,

André


Answer by André Leroy-Beaulieu Castro on 11 February 2020

Hi Neha,

Can you send a screenshot of incoming sync rules on the destination side? Also a screenshot of the group that you are trying to set from the Groups screen.

Thanks,

André


Answer by Neha Aggarwal on 08 February 2020

Hello Andre,

I am getting below error.

Exalate has problems performing an issue update in this Jira. Details: java.lang.String cannot be cast to java.util.Collection

Error Stack Trace

com.exalate.api.exception.IssueTrackerException: Exalate has problems performing an issue update in this Jira. Details: java.lang.String cannot be cast to java.util.Collection at com.exalate.node.compatibility.CompatibilityService.updateIssue(CompatibilityService.java:548) at com.exalate.node.hubobject.v1_4.NodeHubIssueHelper.updateIssueWith(NodeHubIssueHelper.java:686) at

Could you please help for same.

Regards,

Neha Aggarwal


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.