Hello,
In my resolver i have this
resolver.define("getAllProjectsPaginated", async (req) => {
const keyParams = "keys=JAO&keys=PFE&keys=TES";
const maxResults = req.payload?.maxResults || 20;
const result = await api
.asApp()
.requestJira(
route`/rest/api/3/project/search?${keyParams}&expand=lead&maxResults=${maxResults}`,
{
headers: {
Accept: "application/json",
},
},
);
const response = await result.json();
console.log("getAllProjectsPaginated result: ", response);
return response;
});
And in the dev console i get this response
getAllProjectsPaginated result:
{
self: 'https://api.atlassian.com/ex/jira/........./rest/api/3/project/search?expand=lead&maxResults=20&keys=JAO&keys=PFE&keys=TES=&startAt=0',
maxResults: 20,
startAt: 0,
total: 8,
isLast: true,
values: [ ... ]
}
as you can see it gets all 8 projects that i have in the env instead of just the 3 i specified, even when im calling the endpoint according to the jira api documentation here.
This is not my actual use case since im just specifying a string as
const keyParams = "keys=JAO&keys=PFE&keys=TES";
in reality my use case is more like this
const keys = req.payload?.keys || "";
i put it in strings just so that it can be easier to reproduce.
My question now is, if this doesn’t work how can i have an ampersand-separated list in here as a user input filter to only show certain projects.