Hi,
I created a custom field in Service Desk. My customer will insert some unique value in this field while creating a ticket in service desk.
I want to add custom script for this custom field. I will use this field to verify its value through a 3rd party API. I have the code but I don't know where to add this custom script for the custom field.
<script>
$(document).on('click', '.aui-button.aui-button-primary', function (e) {
$.ajax({
url: API_URL
dataType: "json",
method: 'post',
data: {
'action': ENVATO_API,
'value': API_KEY
},
success: function (data) {
if (data.success) {
return true;
} else {
return false;
console.log('Invalid envato key')
}
},
error: function (errorThrown) {
console.log(errorThrown);
}
});
})
</script>
Hello,
I think you should use Adaptivist ScriptRunner. There are behaviours for customer portals. You will be able to attach such a behaviour to your field and do rest calls within the behaviour. You can find more information here
https://scriptrunner.adaptavist.com/latest/jira/behaviours-servicedesk.html#_example
Hi,
I think I need to install the behaviours plugin but it seems like it's not available for cloud Jira. It's only available for hosted Jira.
If so is there any other way to accomplish my goal?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is impossible to add custom javascript to Cloud. I guess you can not accomplish what you want to do.
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.
Hello, is the issue resolved? I also want to add script in my custom field but I don't know where to add. I'm also using JIRA Cloud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.