Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Isolated projects are not displaying on Team Calendar - error message received

Mike Caws
October 12, 2020

 

Isolated projects are not showing in the Team calendar - permissions checked - similar projects display without issue.

Error message : 

Unable to load events of M20 SMT Schedule (769f69e9-1268-4ef9-a9b1-b2b6fc9ee4f6): com.atlassian.confluence.extra.calendar3.exception.CalendarException: calendar3.error.jiralink

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 29, 2021

Your regex is both incomplete and with bad syntax

\$[0-9].[0-9]{2})
^ ^
| |
This means any |
character |
|
Where tis the corresponding open parens?

Also, it's best to use slashy strings for regular expressions in groovy to avoid the need for certain double escaping

Try like this:

if (!val.matches(/\$[0-9]*\.[0-9]{2}/)) {
...
}

I added * to mean any number of digits between "$" and "."

I also added \ in front of "." to mean a literal dot and not the regular expression that means "anything"

And I removed the extra parens

Sysad
Contributor
April 29, 2021

Thank you for sharing your knowledge and insights. Overlooked () and regex is always tricky for me. Anyways Thanks again.

PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 29, 2021

I recommend  https://regex101.com/ to test and validate your regex.

Then double-test in the scriptrunner console with something like this with different "val" input until you are satisfied the logic works.

def val = '100.00'
if (!val.matches(/\$[0-9]*\.[0-9]{2}/)) {
"Amount must be in dollar format."
} else {
"good"
}
Like # people like this
TAGS
AUG Leaders

Atlassian Community Events