Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I restrict a list of issues that is returned for issue-picker?

Michael I.
Contributor
March 26, 2013

Hello.

I'm developing a custom dialog and I need add an issue picker on it. The list of issues that we can select should contain issues of specified type from a one project. Is there a some way to configure the issue picker to achieve this?

I've found on a default page the following code, is there some attributes that I can use in my case?

<select class="aui-field-issuepicker hidden" multiple="multiple" name="parentIssueKey" id="jira-issue-keys-hidden"
	data-popup-width="620"
	data-popup-height="500"
	data-remove-on-un-select="true"
	data-ajax-options.query="true"
	data-ajax-options.url="/rest/api/1.0/issues/picker" 
	data-ajax-options.data.current-issue-key="$!{action.issueObject.key}"
	data-ajax-options.data.show-sub-tasks="false"
	data-ajax-options.data.show-sub-task-parent="true"
	data-ajax-options.data.app-id="">
</select>

4 answers

1 accepted

1 vote
Answer accepted
Timothy
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.
March 31, 2013

Try:

data-ajax-options.url="/rest/api/1.0/issues/picker?query=some_jql_query"

Michael I.
Contributor
March 31, 2013

I've tried this, but with no success. I think, this is because JIRA search issues using History Search instead of JQL Search.

1 vote
Paul S
Contributor
November 23, 2016

Try:

data-ajax-options.data.current-project-id="PROJ"
data-ajax-options.data.current-jql="resolution = Unresolved"

 

0 votes
Denis Yaparov
Contributor
April 6, 2014

Actually, REST Browser https://jira.atlassian.com/plugins/servlet/restbrowser#/resource/internal-1-0-issues-pickercould help - actual parameter name is currentJQL (HTML attribute is data-ajax-options.data.current_jql - from linkjiraissue.vm).

The problem is Issue Picker's REST returns two sections - "History Issues", and only after it - "Current Search". If "HI" has more than 8 issues, than "CS" section will be lower, than user's viewport. I didn't find how to disable history search.

"query" param is used to send current user's input, like part of issue key or summary.

0 votes
Patrick Metzdorf November 19, 2013

I'm having the same problem.

I have created a custom project which holds my vendor contacts (custom issue type I created for contact information).

Now I have added a custom field with the Issue Picker plugin, and would like to restrict the available issues there to my vendor contacts project only.

Has anyone found a solution for this?

Oleg S.
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 19, 2013

After the research, I found out that it is not possible to use JQL at the corresponding ajax-parameter, because JIRA ignores it. Maybe I'm wrong, but I didn't found any way to reuse JIRA REST endpoins, so I implemented my own one.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira product discovery learning path, product discovery training, idea prioritization, align stakeholders, discovery to delivery, product collaboration, atlassian learning, dev process, roadmap planning, insight capture, team alignment

Elevate Your Skills with Jira Product Discovery!

Unlock your potential and learn how to use Jira Product Discovery to your advantage. You’ll have the expertise to revolutionize ideas and insights, roadmapping, engage and align teams and stakeholders, and deliver the best solutions—faster. Enroll today!

Start Learning
AUG Leaders

Atlassian Community Events