Forums

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

display few Projects

Mallela Narender Reddy February 13, 2012

Hi

<webwork:property value="/field('project')/createHtml(null, /, /, /issueObject, @displayParams)" escape="'false'" />

This code displays all the projects .How can i display only few Projects here ??

Thanks
Naren

2 answers

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
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.
February 13, 2012

Either you need to modify the getCreateHtml method in the Project field to return selected projects or extend the relevent action to add a new method and use it in the jsp file.

I am sure you already figured that it currently returns projects where you can access and so you can use permissions to limit the list.

Mallela Narender Reddy February 13, 2012

Hi
i am having a dropdown where i am getting all the projects so how can i get wants to get only few projects in my drop down .
i am extending the CreateIssue.java class and overriding getAllowedProjects() method and returning a collection of my own projects
so now in my drop down how can i get only my projects ??

thanks
Naren

Mallela Narender Reddy February 14, 2012

Hi
i am Having a web-item and upon clicking on that web item i will get 2 drop down one for projects and other for issues
so upon clicking on that webitem my first drop down should display the only few projects .this should happen for only this web-item .

Thanks
Naren

Jobin Kuruvilla [Adaptavist]
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.
February 14, 2012

You must have an action class for the web-item I believe? If so, return the selected list of projects in the action class and use that in the jsp file (or velocity template)!

Mallela Narender Reddy February 15, 2012

I extended CreateIssue Class in my Action class and put the projects and its associated issues in a map and in my jsp file instead of this line
<webwork:property value="/field('project')/createHtml(null, /, /, /issueObject, @displayParams)" escape="'false'" />
i mentioned

<div class="field-group">
<label >
Project :
</label>
<select name="project" id="project">
<% Object object = request.getAttribute("issuemap");
Map map =((Map)object);
for(Object key : map.keySet())
{%>
<option value="<%= key%>"><%= key%></option>

<%}%>
</select>

</div>

Here issuemap has the key as projects and the values as issues associated to the projects.

This above code is for Projects dropdown and for issues drop down is the below code

<ww:property value="/field('issuetype')/createHtml(null, /, /, /issueObject, /displayParams)" escape="'false'" />

so up to here its working fine but when i change my issueTypeScheme for any project , then i am getting a blank for issues dropdown

plz help

Regards
Naren

Mallela Narender Reddy February 15, 2012

Hi
i was able to get it by overriding a mothod in my action class
thanks
Naren

Mallela Narender Reddy February 28, 2012

PLZ CLOSE THE ISSUE :)

Naren

0 votes
rkanumola April 20, 2015

Hi @Jobin Kuruvilla, 

could you please help me converting the following jsp tags to equavalent velocity(.vm) code 

<ww:property value="/field('project')/createHtml(null, /, /, /issueObject, /displayParams)" escape="'false'" />

<ww:property value="/field('issuetype')/createHtml(null, /, /, /issueOabject, /displayParams)" escape="'false'" /> 

Thanks in advance

-RK

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events