Hello,
I've got a field named "Asked" with 2 possible answers (Yes or No) in my issue.
In my workflow, I would like to retrieve the field value.
How can I do that ? I've tried
cfValues['Asked'].getValue() == 'Yes' but that doesn't work... :-(
Thanks,
Christophe
the following code i have usedto get radio button value
CustomFieldManager cfm = ComponentManager.getCustomFieldManager()
CustomField asked = cfm.getCustomFieldObjectByName("Asked")
Option option=(Option)issue.getCustomFieldValue(asked);
if (option.getValue().equals("Yes")) {
// remaining code here
}
if you are doing it by Behaviour plugin then try with this code
FormField asked = getFieldByName ("Asked")
String value = asked.getValue()
if (value == "Yes") {
// remaining code here
}
check this document to get some sample codes
https://jamieechlin.atlassian.net/wiki/display/JBHV/Miscellaneous+Behaviours+Examples
So, in my case, should it be cfValues['Asked'].option.getValue().equals("Yes") ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
something like this
cfValues['Asked'].getValue().equals("Yes")
can you check what value it will return the following code
cfValues['Asked'].getValue()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i have update my answer try with that code it should work!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How can I display tis value in a message box ?
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.