I am creating a JIRA plugin that will show custom page as per my need. In this page I am creating a page that will show a JQL search result. I have created a web-item and action related to it in Atlassian-plugin.xml as below.
Atlassian-plugin.xml
<web-item key="search_allissues_link" name="Srarch All Issues" section="custom_links_link/custom_links_section" weight="10">
<label>Search</label>
<link linkId="create_link">/secure/SearchAllIssuesList!hello.jspa</link>
</web-item>
<action
name="com.plugins.jira.customscreensui.action.JQLSearchAction"
alias="SearchAllIssuesList">
<command name="hello" alias="Hello">
<view name="input">templates/all_issues_list.vm</view>
</command>
</action>
This is my Action class
public class JQLSearchAction extends JiraActionSupport{
List<Issue> issueList;
JQLSearchModel jqlSearchModel;
@RequiresXsrfCheck
protected void doValidation() {}
@RequiresXsrfCheck
protected String doExecute() throws Exception
{
jqlSearchModel=new JQLSearchModel();
issueList=jqlSearchModel.getAllIssuesList();
return "input";
}
@RequiresXsrfCheck
protected String doHello() throws Exception
{
jqlSearchModel=new JQLSearchModel();
issueList=jqlSearchModel.getAllIssuesList();
return "input";
}
public List<Issue> getIssueList() {
return issueList;
}
public void setIssueList(List<Issue> issueList) {
this.issueList = issueList;
}
}
But I am getting following exception java.lang.IllegalArgumentException: No command 'hello' in action Please suggest me the solution if any.
Changing the access specifier of the command method to
public
shall fix your problem.public String doHello()
.I have not tried this code, but looking at the code that's the only thing comes in my mind.
Thank you,