Replies: 2 comments 2 replies
-
Hi @aben141 - Thank you for reaching out to me. Here is an example of how you can achieve what you need with a single line expression: Example 1 - To render only one label:- (this.filter(func('val.includes("DevOps")',['val']))[0] || "").replace("DevOps",'toto') The key here is using func as an alternate for arrow function which takes 3 argument as follows: I am trying to see if I can get the arrow functions working within expressions, but until it is supported, this func should do the trick. To answer your question about using full function: NO, as of now though report builder supports providing multiline expression, the library I use to parse and execute the expression is not supporting that feature. Hence as of now multi line expressions are not supported. This expression is supported only from JA v2.45. So if you are using v2.44 or older, you can try this expression with web version for now and later you can upgrade your extension to v2.45 and use it. |
Beta Was this translation helpful? Give feedback.
-
This issue has been resolved long back and hence closing this ticket. Please feel free to reopen it if you have any other queries. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Thank you for this wonderful JA plugin. I am very grateful.
What I do
I build a custom report, with some common fields like (Key, Summary, Priority), but also with "labels" field.
What I want to do
My objective at the end is to be able to find one specific label and rework it a bit (like cutting 3 first digit on this kind of thing).
So first step is to find the label I want and second step is to modify it.
labels field is a specific field that is an array of String, and unfortunatelly, you can't order labels as you want, Jira is reorganizing the labels as he wants, meaning that I can't assume that the given label I want to take will be 2nd position every time.
My question is :
can I apply a full JS function into "use expression" feature, that will allow me to include conditions ?
I tried but I didn't achieve to get something other than empty field.
if (this.at(1).slice(3) === 'DevOps') { return 'toto'; }
Is there any other way you advice me to take in order to perform what I want ?
Thank
Beta Was this translation helpful? Give feedback.
All reactions