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

Hyphen in date custom field name doesnt work in datecompare


We want to use datecompare in JQL function with customfield dates.

The date field name is Q-Date.

The JQL looks like

issueFunction in dateCompare("","QA Date> Q-Date")

'-' is considered as minus. and get below error

"Scripted function "dateCompare" compilation failure. Contact administrator and check logs. Message: Field name: Q not found or not a date or datetime."


How to esacpe the hyphen in customfield name

1 answer

just quote fieldnames(with a single quotes inside, if outside are double)

issueFunction in dateCompare("","'QA Date' > 'Q-Date'")

Hi Ilya,

It doesnt work. After quotes, it doesn't even identify first date field.

yeah, it's weird

they also recommend using customfield_12345 instead of field name, if it contains any "punctuation", but I also couldn't get it to work

yes, its not working. I tried it with customfield_12345 or cf[12345]. But no success.

Suggest an answer

Log in or Sign up to answer

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