Custom jql functions adding a dropdown

Ankit kharola
Contributor
November 15, 2024

can we create a custom jql functions where we can add a dropdown in jira search bar with the names of user we are fetching in the function?

1 answer

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2024

Hi @Ankit kharola 

No this bar, used by default search no options can be added.

You might find option on the marketplace.

Ankit kharola
Contributor
November 19, 2024

Thank you @Marc - Devoteam  i am trying to learn forge i was trying to create a custom function witn two args first is jql and second is name or id and the jql user types i am trying to validate it through the jql parse rest api 

const validateJQLQueries = async (queries) => {
  
  const bodyData = JSON.stringify({
    queries: [queries]
  });

 
    const response = await api.asUser().requestJira(route`/rest/api/3/jql/parse?validation=true`, {
      method: 'POST',
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json',
      },
      body: bodyData
    });
  console.log(response, "res")
    const result = await response.json();
    console.log(result, "check my result");

    if (response.ok) {
      return { valid: true, results: result };
    } else {
      console.error('Validation failed:', result);
      return { valid: false, errors: result.errors || [] };
    }
 
};  when i pass project=xyz it validates it correctly but i i type assignee=curretUser() it gives error for this and also if i try to combine two queries using AND OR it wont validate it and give error
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2024

Hi @Ankit kharola 

Then it is better to ask your question on the developer community.

https://community.developer.atlassian.com/ 

Ankit kharola
Contributor
November 20, 2024

Thank you  @Marc - Devoteam  i have done that waiting for someone to have a look at it there 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events