Table Transformer: How to use js functions that expect a callback function as parameter?

Stephan Bauer March 31, 2023

For example the ->map() function of arrays expects a function as parameter which is then executed on every item of the array.

How do I pass this function when calling from within the table fransformer plugin?

So I want do something like this:

SELECT *,
       T1.Sprint->split(" ")->map(->match(("[0-9][0-9].[1-5].([1-6]|IP)")->0)
FROM T1

Any ideas?

P.S. Markup for an example table

||Key||Sprint||
|MC20-2943|MC20-23.2.1 (Feb 26) MC20-23.2.2 (Mar 12) MC20-23.2.3 (Mar 26) MC20-23.2.4 (Apr 09)|

1 answer

1 accepted

3 votes
Answer accepted
Katerina Rudkovskaya _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 31, 2023

Hi @Stephan Bauer,

I see that you have a similar question here, so please let’s move to that thread.

Stephan Bauer April 3, 2023

Yes, but no ;-)

The use case I picked is the same but the map function of arrays is just picked as an example here.

The underlying question, I would like to get an answer to, is the one stated in the tite:

How to use js functions that expect a callback function as parameter?

Since I ran into this already multiple times and did not get it working I am interested if this is possible or not.

Best regards,
Stephan

Katerina Rudkovskaya _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 3, 2023

Hi @Stephan Bauer,

Unfortunately, you can't use js functions that have arguments as functions either. This comes from the security side of the app.

Stephan Bauer April 3, 2023

OK, thanks for the clarification.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events