I have one cutom field C1. This C1 type is radiobutton selection . In this C1 field i set values "high", "low", "Medium".
Now i want to get these all values of C1 in my custom JIRA application irrespective of issue.
My code is not aware of all possible values . And my code want to get list of all possible values. This is my query
If you are trying to get the available options, you can get it using OptionsManager. Note that the options can change based on the field configuration and hence you need the field config first.
Options options = optionsManager.getOptions(fieldConfig);
For an issue, you can get fieldConfig as follows:
FieldConfig fieldConfig = customField.getRelevantConfig(issue);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl webservice url.
To use following code which refrence i need to add . because when i use the following code i get error Opetions anf FiledConfig class are not define. Can you please explain following code in brief
Options options = optionsManager.getOptions(fieldConfig);
For an issue, you can get fieldConfig as follows:
FieldConfig fieldConfig = customField.getRelevantConfig(issue);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You did not bother to tell us you were trying to use the SOAP API, so Jobin assumed you were talking about a plugin or core code that has full access to the internal API. His first line of code will get you the options for a field, from the field config, and the second tells you how to establish a fieldconfig from an issue. How you get the right field config depends on where your code is running.
Last time I wrote for SOAP, there was no way to get a list of field options directly. That may have changed, see http://docs.atlassian.com/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html for the latest version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nic said it :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My code is not aware of all possible values . And my code want to get list of all possible values. This is my query
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you explain a little more? I understand that you've got a radiobutton field which has three possible values, but I'm not sure what you want to do with the value? "I want to get all values" is not clear to me - do you mean you want your code to be aware of all possible values? And is the mention of "default" in the title relevant? i.e, if your code wants the list of possible values, then it also needs to know which is the default? Or is my guesswork completely wrong?
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.