Hi,
I am using a web panel module and that showing error.
screen shot->
POM.XML ->
<component-import key="templateRenderer" interface="com.atlassian.templaterenderer.TemplateRenderer"/> <!-- templateRenderer velocity-renderer-->
<web-panel name="ArchivingIndicator" i18n-name-key="archiving-indicator.name" key="archiving-indicator" location="atl.jira.view.issue.right.context" weight="1000">
<description key="archiving-indicator.description">The ArchivingIndicator Plugin</description>
<context-provider class="com.vps.jira.plugin.ArchivingIndicator"/><!-- archiving-indicator -->
<resource name="view" type="velocity" location="/templates/archiving-indicator.vm"/>
</web-panel>
ArchivingIndicator.java ->
public Map<String,Object> getContextMap(ApplicationUser user, JiraHelper jiraHelper)
{
String get=Optional.ofNullable("myinput").orElse("");
Map<String, Object> contextMap = Maps.newHashMap();
//Map contextMap = new HashMap();
Issue currentIssue = (Issue)jiraHelper.getContextParams().get("issue");
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
//CustomField cf = customFieldManager.getCustomFieldObjectByName("Group Picker");
CustomField cf = customFieldManager.getCustomFieldObject("Group Picker");
Object val = currentIssue.getCustomFieldValue(cf).toString();
log.error("CustomField VAlue@@@@"+val);
if(val == null || val =="")
{
contextMap.put("daysAwayFromDueDate", currentIssue);
log.error(currentIssue+"@@@***");
return contextMap;
}
else
{
return contextMap;
}}
Archiving-indicator.vm ->
#set ($issue = $daysAwayFromDueDate)
#if ($daysAwayFromDueDate != "$daysAwayFromDueDate")
#else
<form name="deArchiveing" action="/plugins/servlet/dearchiving.jspa">
<!-- <span style="font-weight: bold; color: red;">$daysAwayFromDueDate</span> -->
<input id="clickMe" type="submit" value="Unarchive" onclick="DoSubmit();" style="font-weight: bold; color: red;" />
<input type="hidden" name="myinput" value="0" />
<script type="text/javascript">
var issueKey;
function DoSubmit()
{
issueKey = "$daysAwayFromDueDate";
var currentLocation = window.location;//current page address (URL) and to redirect the browser to a new page.
document.deArchiveing.myinput.value = issueKey+"@"+currentLocation;
document.getElementById("deArchiveing").submit();
}
</script>
</form>
#end
=======================
using JIRA 7.13.0.
anyone help me i dont understand why exact error is occured?
I got a similar Error, did u fix it? And when how ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to get this resolved.
This is my atlassian-plugin.xml:
<!-- My Web Panel in Issue View Velocity Template-->
<web-panel name="Template Module" key="template-module" location="atl.jira.view.issue.left.context" weight="100">
<context-provider class="de.conciso.contextproviders.EmployeeContextProvider" />
<resource name="view" type="velocity" location="templates/mitarbeiter.vm"/>
</web-panel>
My Resource is "empty":
public class EmployeeContextProvider implements ContextProvider {
@Override
public void init(Map<String, String> params) throws PluginParseException {
}
@Override
public Map<String, Object> getContextMap(Map<String, Object> context) {
return Collections.emptyMap();
}
}
My mitarbeiter.vm:
<html>
<body>
#set( $foo = "Velocity" )
Hello $foo World!
</body>
<html>
Have a look into ur target directory. target/jira/home/log/atlassian-jira.log
My errors were shown there.
If u need further assistance, just reply and I try to help u.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.