Hi,
we upgraded to JIRA 7 from v6.4.11 to v7.1.4 and ScriptRunner form v4.1.3.15 to v4.3.4. Since then some of the behaviour scripts (triggered at ticket creation) doesn´t work anymore. If I remove the following script evertything works as it should. But we need this script.
I have activated the logging but there are no errors in the log.The script validation say: unable to resolve class FormField. I have tried to switch from FormField to def - it does not work.
image2016-7-4 15:45:53.png
Any idea how to solve this issue?
Kind regards, Benjamin
FormField FieldKategorie11507 = getFieldById ("customfield_11507") FieldKategorie11507.setHelpText("<script type=\"text/javascript\">FieldKategorie11507_Value=document.getElementById(\'customfield_11507\');\ FieldTechnPL_1=document.getElementById(\'customfield_12002\').parentNode;\ FieldTechnPL_2=document.getElementById(\'customfield_12002\');\ FieldFachlPL_1=document.getElementById(\'customfield_12003\').parentNode;\ FieldFachlPL_2=document.getElementById(\'customfield_12003\');\ FieldLinkKPLaufwerk_1=document.getElementById(\'customfield_12004\').parentNode;\ FieldLinkKPLaufwerk_2=document.getElementById(\'customfield_12004\');\ FieldLinkAlfi_1=document.getElementById(\'customfield_11401\').parentNode;\ FieldLinkAlfi_2=document.getElementById(\'customfield_11401\');\ switch(FieldKategorie11507_Value.value){case\'11222\':\ var value=\"gginf22\";\ AJS.\$(\"#assignee-field\").val(value);\ AJS.\$(\"#assignee\").find(\":selected\").data(\"descriptor\").model()[0].value=value;\ AJS.\$(\"#customfield_12002\").closest(\'div.field-group\').hide();\ FieldTechnPL_2.value=\"\";\ AJS.\$(\"#customfield_12003\").closest(\'div.field-group\').hide();\ FieldFachlPL_2.value=\"\";\ FieldLinkKPLaufwerk_1.style.display=\'none\';\ FieldLinkKPLaufwerk_2.value=\"\";\ FieldLinkAlfi_1.style.display=\'none\';\ FieldLinkAlfi_2.value = \"\";\ break;\ case\'11223\':\ var value=\"gginf22\";\ AJS.\$(\"#assignee-field\").val(value);\ AJS.\$(\"#assignee\").find(\":selected\").data(\"descriptor\").model()[0].value=value;\ AJS.\$(\"#customfield_12002\").closest(\'div.field-group\').hide();\ FieldTechnPL_2.value=\"\";\ AJS.\$(\"#customfield_12003\").closest(\'div.field-group\').hide();\ FieldFachlPL_2.value=\"\";\ FieldLinkKPLaufwerk_1.style.display=\'none\';\ FieldLinkKPLaufwerk_2.value=\"\";\ FieldLinkAlfi_1.style.display=\'none\';\ FieldLinkAlfi_2.value = \"\";\ break;\ case\'11226\':\ var value=\"rmb10004526\";\ AJS.\$(\"#assignee-field\").val(value);\ AJS.\$(\"#assignee\").find(\":selected\").data(\"descriptor\").model()[0].value=value;\ AJS.\$(\"#customfield_12002\").closest(\'div.field-group\').show();\ AJS.\$(\"#customfield_12003\").closest(\'div.field-group\').show();\ FieldLinkKPLaufwerk_1.style.display=\'\';\ FieldLinkAlfi_1.style.display=\'\';\ break;\ default:\ var value=\"-1\";\ AJS.\$(\"#assignee-field\").val(value);\ AJS.\$(\"#assignee\").find(\":selected\").data(\"descriptor\").model()[0].value=value;\ AJS.\$(\"#customfield_12002\").closest(\'div.field-group\').hide();\ FieldTechnPL_2.value=\"\";\ AJS.\$(\"#customfield_12003\").closest(\'div.field-group\').hide();\ FieldFachlPL_2.value=\"\";\ FieldLinkKPLaufwerk_1.style.display=\'none\';\ FieldLinkKPLaufwerk_2.value=\"\";\ FieldLinkAlfi_1.style.display=\'none\';\ FieldLinkAlfi_2.value=\"\";\ break;}</script>")
Hi @Jamie Echlin [Adaptavist],
how do I solve this issue?
Regards, Benjamin
Hi Jamie,
the script validation is ok now
But i am still not able to create tickets. I stuck at the creation screen. Clicking the create button does nothing and I can see timeouts in the logs. If I remove this script everything works. Other scripts are working at the same time, though.
Regards, Benjamin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it's easier if you would comment on answers rather than creating new answers.
Please could you check your javascript logs by pressing f12? It might be easier to give them to us privately which, you can do by raising a ticket at https://productsupport.adaptavist.com/servicedesk/customer/portal/2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you try with the import:
import com.onresolve.jira.groovy.user.FormField
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.