title: Updating Select List Custom Field - Jira Python
body: <p>I have a custom field named "<em>Status</em>" with an id of 10100 which is a <strong>select list</strong> with optional values of "<em>One</em>", "<em>Two</em>", "<em>Three</em>" and "<em>Four</em>". Default value is "<em>One</em>".</p>
  
  <p>I am writing a JIRA python script to update the value of this field conditionally. Say if the existing value is "<em>One</em>", it should be changed to "<em>Two</em>".</p>
  
  <p>This is my code.</p>
  
  <pre><code>from jira.client import JIRA
  jira_options={'server': 'http://localhost:8080'}
  jira=JIRA(options=jira_options,basic_auth=('usrname','pwd'))
  
  for issue in jira.search_issues(' cf[10100] = "One" '):
      issue.update(fields={'customfield_10100': 'Two'})
  </code></pre>
  
  <p>It's giving me the following error.</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 11, in &lt;module&gt;
      issue.update(fields={'customfield_10100': 'Two'})
    File "C:\Python27\lib\site-packages\jira\resources.py", line 193, in update
      super(Issue, self).update(**data)
    File "C:\Python27\lib\site-packages\jira\resources.py", line 72, in update
      raise_on_error(r)
    File "C:\Python27\lib\site-packages\jira\exceptions.py", line 29, in raise_on_
  error
      error = errorMessages[0]
  IndexError: list index out of range
  </code></pre>
  
  <p>Could you please tell me what might be wrong?
  I had used the same syntax for editing a custom field of type <strong>text field</strong> and it had worked fine.</p>