Hello,
I first created a web-item that was located in the Administration section of Jira, under the Global Settings section. It consists of a form and when executed, calls an action and based on the date parameters submitted in the form, executes some actions.
Here is my atlassian-plugin.xml
<project-tabpanel key="Monthly Data" name="Monthly Data" class="com.moog.jira.plugins.MonthlyDataCalc">
<label key="Monthly Data">Monthly Data:</label>
<description>Calculated monthly data</description>
<order>20</order>
<resource type="velocity" name="view" location="templates/inputdate.vm" />
</project-tabpanel>
<webwork1 key="com.moog.jiraplugins.UpdateDataAction" class="java.lang.Object">
<actions>
<action name="com.moog.jira.plugins.UpdateDataAction" alias="datePlannerUpdateData">
<view name="success">/templates/CalculationsView.vm</view>
<view name="input">/templates/CalculationsView.vm</view>
</action>
</actions>
</webwork1>
My ProjectPanel class implements AbstractProjectTabPanel.
Here is my inputdate.vm content:
<form method="post" action="/jira/secure/datePlannerUpdateData!upload.jspa">
<b>From Date:</b> <input name="fromDate">
<input type=button value="select" onclick="displayDatePicker('fromDate', this);">
<b>To Date:</b> <input name="toDate">
<input type=button value="select" onclick="displayDatePicker('toDate', this);">
<input type="submit" value="GO">
</form>
<p>
And finally, the UpdateDataAction class extends JiraWebActionSupport.
When I submit the form I am not able to get the form parameter values in the action class. It is coming as "null". In my action class I am using getFromDate() and getToDate() to retrieve form parameter values.
Any idea what I did wrong here?
Thanks so much!