Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner for Jira Datacenter -> Insight - Error: 750: you tried to assign a value to the class

I am trying to unpick something that has been working but seemingly broke a little while back.

We have a Jira project for Contract Management and are using Scriptrunner with a Post Transition Function to add an object to Insight.

We are seeing an error when the Post Function runs:

ViewWorkflowTransition.jspa?workflowMode=live&workflowName=Create+Contract&descriptorTab=postfunctions&workflowTransition=1&highlight=4
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/Path/InsightManagerForScriptrunner.groovy: 750: you tried to assign a value to the class 'java.util.Map'
@ line 750, column 21.
Map.value = Map.value.collect { it.toString() }
^
1 error

Am a bit stumped having not used Scriptrunner previously, what can I check in the script to see what might be causing this?

3 answers

1 accepted

0 votes
Answer accepted

I would expect the word "Map" to be in lower case. But that depends on whether you have an actual variable called "map".

But if you could share a larger snippet of the script I can help further debug.

Thanks @Peter-Dave Sheehan @Joshua Sneed _ Contegix for your uber quick responses.

Would you believe it was a typo, changed upper case on the Map.value for map.value and that fixed it !

Hi Simon,

What is on line 750 in the 21st position? It may also help to place a few logging lines in your script so that you can check variable values after it runs, this may allow you to see a data type mismatch or the value you tried to assign to the class. Cheers!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

483 views 16 17
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you