Trying to use spaces in jira script runner built in function parentOf()

Hi!

I'm trying to create a new filter in jira with the help of a Script Runner built in script called parentOf().

The problem i'm faceing is that my project name has a space-character in it.

issueFunction in parentsOf("project = My Project and status = Open")

And this returns: NoViableAltException(34@[584:1: operand returns [Operand operand] : ( EMPTY | str= string | number= numberString | fn= func | l= list );])

I know that you can specify a custom field like cf[10001] for example. Can one specify a project in a similar fashion? Or like in PHP with single and bouble quotes 'project = "My Project"'? Or I'm i screwed? ;)

Can anyone point me in the right direction?

Best regards

Joachim Westlund

1 answer

1 accepted

0 votes

You could use the project key there, or use single quotes around My Project.

Ah! Thank you. I used the single quotes and i worked!

I never tried to use the single quotes inside the double ones. I only tried the other way around.

I'm very greatful!

// Joachim

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,000 views 12 18
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