Bug in parser
Hi Fidel,
It seems like I found a bug in the parser.
The following function doesn't work:
toString(filterByPredicate(toStringList(projectProperty("IssueFlowComp_" + %{00014}),";"),^% ~ first(toStringList(toString(filterByPredicate(textOnStringList(textOnStringList(toStringList(projectProperty("IssueFlowComp_" + % {00014}),";"),replaceFirst(^%,"^.+:","")),toString(intersect(toStringList(^%,","),toStringList(%{00094},",")))),^% != "")),","))))
where
projectProperty("IssueFlowComp_" + %{00014}) = "SSL:Component1;Simple:Component3" Component(s) in the issue = "Component3"
returns "SSL:Component1;Simple:Component3" instead of "Simple:Component3".
After an investigation, I found that function filterByPredicate doesn't work. When I took out the second argument of filterByPredicate function into string, it started to work:
Ephemeral String 1 = first(toStringList(toString(filterByPredicate(textOnStringList(textOnStringList(toStringList(projectProperty("IssueFlowComp_" + %{00014}),";"),replaceFirst(^%,"^.+:","")),toString(intersect(toStringList(^%,","),toStringList(%{00094},",")))),^% != "")),","))
and
toString(filterByPredicate(toStringList(projectProperty("IssueFlowComp_" + %{00014}),";"),^% ~ %{00061}))
and returns "Simple:Component3", as expected.
JIRA 6.4.11 JWT 2.2.11
Best, AK.
Comments (3)
-
repo owner -
reporter Thank you, Fidel, it works! I see where the root cause was - references with nested operations.
-
repo owner - changed status to resolved
- Log in to comment
Hi Andrey,
Please, try the following text to be parsed, and let me know if it works as your expect:
A tip: ^% is an alias for ^0%