Remote setting of custom field via REST
Use JIRA's REST API to set the custom field of type "Traffic-Light Status" available since version 2.0: please find enclosed a sample REST-call.
Known problem by upgrading from version 1.x to version 2.y
The traffic-light custom field is derived from the native option field of JIRA. Unfortunately, Atlassian seems to have changed the format with regard to JIRA 7.
Assuming, that you have access to your JIRA database as administrator/dba, please look in the genericconfiguration table:
the default value for the custom field that is broken has got an entry like <string>####</string> and it should have got the new entry like <long>####</long> in the xmlvalue column.
Please change the tag in the old entry from <string> to <long> in order to fix that problem (no more 500 errors and everything is displaying ok).
Use the following SQL-statement to detect that records:
SELECT * FROM genericconfiguration where datakey IN (SELECT CAST (b.id AS CHAR (10)) FROM customfield a, fieldconfiguration b where b.FIELDID=('customfield_' ||a.id) AND CUSTOMFIELDTYPEKEY like '%trafficlight-status%') AND (xmlvalue like'%<string>%');
SELECT * FROM genericconfiguration where datakey IN (SELECT CAST (b.id AS CHAR (10)) FROM customfield a, fieldconfiguration b where b.FIELDID=(CONCAT('customfield_', a.id)) AND CUSTOMFIELDTYPEKEY like '%trafficlight-status%') AND (xmlvalue like'%<string>%');