JIRA: Incorporating a Scriptrunner UI Button on the Issue Creation Screen

How can I add a Scriptrunner-driven button beside the issue description field in JIRA’s create dialog? For instance, this snippet inserts preset text:

output.print("<button onclick='applyPreset()'>Preset</button><script>function applyPreset(){document.getElementById('desc').value='sampleText';}</script>");

hey try using a custom web fragment instead of raw script. jira often sanitizes html in create dialogs so embedding your code in an approved module may work. check your admin rights too.