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 vote

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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

60 views 0 5
Read article

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