Hi All,
I am using the below code to read a group picker field.
def groupManager = ComponentAccessor.getGroupManager()
def gpField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName(fName)
String cfVal = issue.getCustomFieldValue(gpField)
But i am getting below value:
[com.atlassian.crowd.embedded.impl.ImmutableGroup@8b6fabb8]
I am expecting the exact group value instead of object. Please suggest me.
Thanks in Advance,
Mani
You can use:
def groupManager = ComponentAccessor.getGroupManager()
def gpField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName(fName)
def cfVal = issue.getCustomFieldValue(gpField)
if(cfVal){
// for single group picker
log.error(cfVal.get(0).getName())
// for multi group picker
//cfVal.each{
// log.error(it.getName())
//}
}
Thank you Martin, it worked.
Could also please help me setting the value for DataPicker field. I am using the below code
def pattern = "dd/MMM/yy"
Date dt = new SimpleDateFormat(pattern).parse("13/Aug/19")
I am getting below error:
2019-08-13 05:53:29,439 ERROR [runner.AbstractScriptListener]: ************************************************************************************* 2019-08-13 05:53:29,441 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.IssueEvent, file: <inline script> java.lang.IllegalArgumentException: Java type java.util.Date not currently supported. Sorry.
Thanks in Advance,
Mani
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.