How to add projectOrFilterId filter on your gadget?

Albrit Bendo August 15, 2019

I am developing a new gadget for Jira Server. Among some filters I would also like to add the projectOrFilterId (which is by default in all Jira gadgets).

 

I have seen these lines so far:

1. Declaration

 <UserPref name="projectOrFilterId" datatype="hidden"/> 

2. Search field

 var searchParam ;
if (/^jql-/.test(preferences.projectOrFilterId) || this.getPref("isPopup") === "true"){
searchParam =
{
userpref: "projectOrFilterId",
type: "hidden",
value: gadgets.util.unescapeString(preferences.projectOrFilterId)
};
}
else {
searchParam = AJS.gadget.fields.projectOrFilterPicker(gadget, "projectOrFilterId");
}

But the problem is that I cannot see the filter as is hidden. Is there any API or some other form to get this filter show and work on my personalized gadget?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events