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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

1 answer

0 votes

Look closely at what you are doing with JiraIssueList - you get its content and split it as though it is a string.  Is it really a text field with a list of issue keys in it?  Do you actually trust your humans to get the format right every time?

Assuming it is a valid list like that, then think of the text in it - it's an issue key.  So when you cast it to a mutableissue, the result is utter nonsense - an issue is not a string of characters.

Your log will tell you that line is nonsense whenever it executes, and because it is, the script will stop at that point.

Step back and look at the actual type of field 10083 is - is it really a string?  Or is it a select list or issue picker?  Once you know what type of data is really in it, you can parse it and use that data to find the issue it is pointing to.

The custom field is a Text-Field (multi-line), which is a string.

Changing

def jiraIssue = removeComma.replaceAll(","," ") as MutableIssue

to

MutableIssue jiraIssue = removeComma.replaceAll(","," ")

I get an error Cannot assign value of java.lang.String to MutableIssue.

Yes, that's what I said - you can't just cast an arbitrary string to an issue.

Your code needs to work out what issue the string is pointing to (if that is a valid pointer - you really do need to check that the string is actually valid, as a human could be putting anything into it)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,120 views 8 28
Join discussion

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