MDD validation bug with >= - makumba

I use this validation rule in the MDD:
compare(maxSizeOfGroup, minSizeOfGroup) {maxSizeOfGroup >= minSizeOfGroup} :
"The maximum number of people can't be smaller than the minimum number!"
Yet I see the error message I defined when I choose both to be the same number.
Btw, in the documentation it says to use ">=" but that gives the error
"[...] unexpected char: '\' [...]"

Indeed there is a bug with the "<=" and ">=" when having a live validation.
This will be fixed in the next release. Until then you will have to either disable the live validation, or just use different validation rules.
As for documentation, it has an escaping error. The "\" is not supposed to be there.

Related

How to fix ICU Lexing Error: Unexpected character in Flutter

I am using flutter_localizations to localize my app.
Since updating to Flutter 3.7 i am getting this error:
ICU Syntax Error: Expected "identifier" but found "}".
This =|(){}[] obviously
This =|\(){}[] obviously is the text that i have in my .arb file.
I understand that curly braces "{}" have a special meaning and should be escaped, but i can not find the way to correctly escape them, has anyone managed to do so?
One simple way to reproduce the issue is simply following the steps to add localization support here, and then instead of the hello world string, write anything that includes the character "{".
P.S.: There is a releted issue open on Github. Be sure to go and check there for updates!
There is an escaping syntax that is implemented but not enabled by default as it is a new feature that wasn't completely backward compatible with existing ICU message strings.
First, add the following to your l10n.yaml file:
use-escaping: true
Then, this will allow you to wrap parts of your strings in single quotes to ignore any syntax within the single quotes; to use a single quote normally as a character and not an escape, use a double single quote. For example,
{
message: "This '{isn''t}' obvious"
}
becomes
String get message => "This {isn't} obvious";
See here for information on the syntax. I'll add this to the documentation later.

Lua pattern matching for email address

I having the following code:
if not (email:match("[A-Za-z0-9%.]+#[%a%d]+%.[%a%d]+")) then
print(false)
end
It doesn't currently catch
"test#yahoo,ca" or "test#test1.test2,com"
as an error.
I thought by limiting the input to %a - characters and %d - digits, I would by default catch any punctuation, including commas.
But I guess I'm wrong. Or there's something else that I'm just not seeing.
A second pair of eyes would be appreciated.
In the example of "test#test1.test2,com", the pattern matches test#test1.test2 and stops because of the following ,. It's not lying, it does match, just not what you expected. To fix, use anchors:
^[A-Za-z0-9%.]+#[%a%d]+%.[%a%d]+$
You can further simplify it to:
^[%w.]+#%w+%.%w+$
in which %w matches an alphanumeric character.
I had a hard time finding a true email validation function for Lua.
I couldn't find any that would allow some of the special cases that emails to allow. Things like + or quotes are actually acceptable in emails.
I wrote my own Lua function that could pass all the tests that are outlined in the spec for email addresses.
http://ohdoylerules.com/snippets/validate-email-with-lua
I also added a bunch of commentd, so if there is some strange validation that you want to ignore, just remove the if statement for that particular check.

How to solve "The character '%' is a reserved JQL character" error

I'm having a problem using mylyn jira connector with jira 6.1
I have some queries configured, which work, but now I can't add a new query.
I've tried adding the same query as a filter import and using the eclipse form.
In both cases I get the following error message, even though the query itself doesn't contain any percent characters:
Error in the JQL Query: The character '%' is a reserved JQL
character. You must enclose it in a string or use the escape '\u0025'
instead. (line 1, character 13)
com.atlassian.connector.eclipse.internal.jira.core.service.JiraException: Error in the JQL Query: The character '%' is a reserved JQL character. You must enclose it in a string or use the escape '\u0025' instead. (line 1, character 13)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:765)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.getIssues(JiraRestClientAdapter.java:314)
at com.atlassian.connector.eclipse.internal.jira.core.service.JiraClient.findIssues(JiraClient.java:371)
at com.atlassian.connector.eclipse.internal.jira.core.service.JiraClient.findIssues(JiraClient.java:363)
at com.atlassian.connector.eclipse.internal.jira.core.service.JiraClient.search(JiraClient.java:760)
at com.atlassian.connector.eclipse.internal.jira.core.JiraRepositoryConnector.performQuery(JiraRepositoryConnector.java:140)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQuery(SynchronizeQueriesJob.java:311)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.synchronizeQueries(SynchronizeQueriesJob.java:268)
at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeQueriesJob.run(SynchronizeQueriesJob.java:201)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: com.atlassian.jira.rest.client.RestClientException: Error in the JQL Query: The character '%' is a reserved JQL character. You must enclose it in a string or use the escape '\u0025' instead. (line 1, character 13)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:76)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.getAndParse(AbstractJerseyRestClient.java:88)
at com.atlassian.jira.rest.client.internal.jersey.JerseySearchRestClient.searchJqlImpl(JerseySearchRestClient.java:107)
at com.atlassian.jira.rest.client.internal.jersey.JerseySearchRestClient.searchJql(JerseySearchRestClient.java:74)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$5.call(JiraRestClientAdapter.java:318)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter$5.call(JiraRestClientAdapter.java:1)
at com.atlassian.connector.eclipse.internal.jira.core.service.rest.JiraRestClientAdapter.call(JiraRestClientAdapter.java:730)
... 9 more
Caused by: com.sun.jersey.api.client.UniformInterfaceException: Client response status: 400
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:607)
at com.sun.jersey.api.client.WebResource.get(WebResource.java:187)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient$1.call(AbstractJerseyRestClient.java:92)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:62)
... 15 more
I know that this is old, by just in case anyone else gets here...
I got this error by missing the 's' in https when setting up task repo. Added the 's' and hit re-validate. It solved the problem.
The error was quite misleading.
Unfortunately I was unable to edit #Jacek anwser, so let me put it here:
The problem was caused by a faulty configuration of Apache server in front of JIRA. If you run into a similar situation rigt-click on the query to open it in the browser - it's much easier to check what's going on that way.
And Atlassian, please make the error reports more intelligible.
A new bug has been created for "Atlassian Connector for Eclipse" to address this issue.
Specifically, let us know your JQL query. I wonder if there is any space character in the place we do not escape.
It turns out that the problem was caused by a faulty configuration of Apache server in front of JIRA. If you run into a similar situation rigt-click on the query to open it in the browser - it's much easier to check what's going on that way.

How can I use cursors to paginate field-expanded queries?

I can do this:
/<post_id>/comments?filter=stream&limit=100&after=<cursor>
But this doesn't work:
/<post_id>?fields=comments.filter(stream).limit(100).after(<cursor>)
Am I missing something in the syntax? Though cursor-based paging and field expansion were launched a the same time, their respective docs don't reflect each other.
Just figured this out (I think).
Most cursors have an = (equals sign) appended to them. For example: MzA=
This causes this syntax error in field expansion:
Syntax error "Expected ")" instead of '".' at character 79: comments.filter(stream).limit(10).summary(true).fields(id,like_count).after(NDA"
However, stripping the trailing = resolves the syntax error and results seem to paginate as expected.

JasperReports Text Field Expression doesn't really let me put in anything except a variable or field reference

Referencing the page number variable in JasperReport as $V{PAGE_NUMBER}. Of course that works fine. However, I would like this report to have a page number preceded by a letter, as in:
A-1
A-2
...
A-N
Unfortunately, this does not appear to be permitted. Even when I get the expression editor to accept an expression, it still fails to compile. Always with "cannot cast from String to Integer", or "cannot cast from Integer to String" errors, or sometimes both.
"A-".concat($V{PAGE_NUMBER}.toString()) does not work. No possible variation works, mystifyingly.
Just a note, you can write it as "A-" + $V{PAGE_NUMBER}
Yeah, you can't teach smart. I neglected to change the field type from Integer to String. And I was about to disparage an awesome free product. D'Oh.