title: How do I save a value into a custom field in JIRA programmatically?
body: <p>I've spent days trying to find out how to save or update a value into a CustomField programmatically and finally found out how it's done.  So I'll make this a question and then answer it as I would have loved to have this question and answer.</p>
  
  <p>There is conflicting documentation on how to save or update a value for a Custom Field in JIRA.  I was using:</p>
  
  <pre><code>customField.setCustomFieldValue(CustomField, value);
  </code></pre>
  
  <p>This does not save the value into the database but it does update the value as far as I can tell.  It's only useful if you are using the CustomField further down in a Workflow Post Function transition for example.</p>
  
  <p>I'm using Jira 4.3.2.</p>
  
  <p>How do I persist the the CustomFields value into the JIRA database?</p>