It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Creating Mail handler plugin GUI Edited

I try to create mail handler plugin folowwing "Creating a custom mail handler for Jira" tutorial.   I can't get parameters in class, which I add in to the form, when I try to create new mail handler. But I can get parameters when I try to edit already existing incoming mail handler, in that time I see parameters in copyServiceSettings method. Do I need override some more methods of AbstractEditHandlerDetailsWebaction class or something else?   Unfortunately I can't add code of my  EditDemoHandlerDetailsWebAction class because message marked as spam( Any help will be very important, thanks.

1 answer


Have you tried to add vm resource file in <actions> tag as described in the tutorial?

You need to add getter and setter methods in EditDemoHandlerDetailsWebAction class (assuming it is your action class) per each inputs in your vm file.

Hello. Here is part of my atlassian-plugin. xml where I add EditDemoHandlerDetailsWebAction class and editDemoHandlerDetails.vm

<webwork1 key="actions" name="UI" class="java.lang.Object">
<action name="com.example.plugins.tutorial.jira.mailhandlerdemo.EditDemoHandlerDetailsWebAction"
<view name="input">/view/editDemoHandlerDetails.vm</view>
<view name="securitybreach">/secure/views/securitybreach.jsp</view>

 is that OK? 

Do you have editDemoHandlerDetails.vm in the right folder? And does your EditDemoHandlerDetailsWebAction class contain those fields' (in vm file) getter/setter?

editDemoHandlerDetails.vm is in src\main\resources\view\

Here's my vm file

## couple of available navigation helpers
#set ($modifierKey = $action.browserUtils.getModifierKey())
#set ($submitAccessKey = $i18n.getText('AUI.form.submit.button.accesskey'))
#set ($submitTitle = $i18n.getText('AUI.form.submit.button.tooltip', [$submitAccessKey, $modifierKey]))
#set ($cancelAccessKey = $i18n.getText(''))
#set ($cancelTitle = $i18n.getText('', [$cancelAccessKey, $modifierKey]))

<form class="aui" action="EditDemoHandlerDetails.jspa" method="POST" name="mailHandlerForm" id="mailHandlerForm">
<div class="form-body">
<span class="global-errors-location">
#if ($action.getHasErrorMessages())
#foreach ($error in $action.getFlushedErrorMessages())
#AUImessage("error" "" $textutils.htmlEncode(${error}) "" "" "" "true")
<input type="hidden" name="atl_token" value="$atl_token">
<label>$i18n.getText('demohandler.project')<input type="text" class="text" id="issue-key" name="issueKey" value="$!textutils.htmlEncode($issueKey)"></label>
<label>$i18n.getText('demohandler.issueType')<input type="text" class="text" id="issueType" name="issueType" value="$!textutils.htmlEncode($issueType)"></label>
<label><input type="text" class="text" id="reporterusername" name="reporterusername" value="$!textutils.htmlEncode($reporterusername)">$i18n.getText('demohandler.reporterusername')</label>
<label>CheckBox1 <input type="checkbox" name="checkBox"/>CheckBox222</label>

<div class="buttons-container form-footer">
<div class="buttons">
#if ($action.editing)
#set ($addButtonLabel = $i18n.getText(''))
#set ($addButtonLabel = $i18n.getText('common.forms.add'))
<input id="addButton" type="submit" class="button" value="$!addButtonLabel" accesskey="$submitAccessKey" title="$submitTitle">
<a href="IncomingMailServers.jspa" class="cancel" accesskey="$cancelAccessKey" title="$cancelTitle">$i18n.getText("")</a>


You mean, that I need add getter/setter for all inputs in vm file?

You can add input fields (text, radio, check, select) to this vm file and access them in your java file.

Also you can get pre-defined values in your vm file by $action.field 

And yes, you have to add getter/setter

Thanks a lot! I'll inform when i try

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Keep your team in the loop with Team @mentions in Jira Software!

Hi everyone! My name is Jenny, a Product Manager at Atlassian. After launching Team @mentions in Confluence, we heard a lot of positive feedback from customers that they love how easy it is to @men...

225 views 4 12
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you