Hi
In my plugin I am reading from a user picker custom field.
I see that the issue that I am reading from has the value when I look at the issue in JIRA. However when I try to read the same value from my plugin I get null.
Is reading from user picker any different from reading from other custom fields. Please let me know.
Thanks
Abe
Community moderators have prevented the ability to post new answers.
What happens when you try issue.getCustomFieldValue(certificationPM)? Also are you sure the issue object has the correct Issue?
It has correct issue
Here is the output:
2012-10-19 21:44:47,347 http-8080-6 INFO admin 1304x3133x1 ex4ha3 127.0.0.1 /secure/QuickEditIssue.jspa [my.jira] value from field in issue to asign user:com.atlassian.crowd.embedded.ofbiz.OfBizUser@57352299
If I cast the retrun value to string it has null.
This has me beat..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't cast it to String because it is a user field. Cast it to User and then get the details from User object.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager(); CustomField certificationPM = customFieldManager.getCustomFieldObjectByName("Certification PM"); String strCertificationEngPM = "NoValue"; if(certificationPM != null){ log.info("value from field in issue to asign user:"+certificationPM.getValueFromIssue(issue)); strCertificationEngPM = certificationPM.getValueFromIssue(issue); }
It is getting into if condition indicating that field is found, log statement output is:
value from field in issue to asign user:null
But when I see in the issue the field has value.
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.