Hi All,
I've been tasked to set a customfield with Javascript.
Back story is that i want to query an API via javascript and then get the return values to set the customfields in the create screen so it "Auto-populates" certain customfield.
Im currently having difficulties, just setting the customfield field with free text.
The current code i have is
<script type="text/javascript">
jQuery(document).ready(function($) {
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
setDefaultValues();
});
setDefaultValues();
function setDefaultValues(){
setFieldValue();
}
function setFieldValue(){
$("#customfield_13600").val('Test');
});
</script>
But it doesn't seem to set the customfield to "Test".
Any help is much appreciated.
Thanks,
Pon