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

Accepted Answer
0 votes

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.

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

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

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)!

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

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

PLZ CLOSE THE ISSUE :)

Naren

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
Community showcase
Posted yesterday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

47 views 2 4
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you