Behaviours doesn´t work after upgrade

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>")

3 answers

0 votes

can you try with the import:

import com.onresolve.jira.groovy.user.FormField

Hi Jamie,

the script validation is ok now tick

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

 

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

 

Hi @Jamie Echlin [Adaptavist],

how do I solve this issue?

Regards, Benjamin

 

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,119 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot