<%@ page import="webwork.action.CoreActionContext,
                 webwork.util.ValueStack,
                 com.atlassian.jira.ManagerFactory,
                 com.atlassian.jira.config.properties.APKeys,
                 org.ofbiz.core.entity.GenericValue,
                 com.atlassian.core.util.DateUtils"%>
<%
    GenericValue issue = (GenericValue) CoreActionContext.getValueStack().findValue("issue");

    String issueUrl = ManagerFactory.getApplicationProperties().getString(APKeys.JIRA_BASEURL)+"/browse/" + issue.getString("key");
    String issueUrlViaId = ManagerFactory.getApplicationProperties().getString(APKeys.JIRA_BASEURL)+"/secure/ViewIssue.jspa?id=" + issue.getString("id");
    String issueUrlViaKey = ManagerFactory.getApplicationProperties().getString(APKeys.JIRA_BASEURL)+"/secure/ViewIssue.jspa?key=" + issue.getString("key");
    DateUtils dateUtils = new DateUtils(null); //ISO8601 does not need the resource bundle.  We should split this out
    pageContext.setAttribute("dateUtils", dateUtils);

%>
<webwork:bean name="'com.atlassian.core.util.StringUtils'" id="stringUtils" />
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description rdf:about="<%= issueUrl %>"
    dc:title="[#<webwork:property value="string('key')" />] <webwork:property value="string('summary')" />"
    dc:subject="<webwork:property value="/projectManager/project(long('project'))/string('name')" />"
    dc:description="<webwork:property value="@stringUtils/crop(./string('description'), 100, ' ...')" />"
    dc:date="<webwork:property value="@dateUtils/formatDateISO8601(timestamp('created'))" />"
    dc:identifier="<%= issueUrl %>"
    trackback:ping="<webwork:property value="applicationProperties/string('jira.baseurl')"/>/rpc/trackback/<webwork:property value="string('key')"/>"/>

<rdf:Description rdf:about="<%= issueUrlViaId %>"
    dc:title="[#<webwork:property value="string('key')" />] <webwork:property value="string('summary')" />"
    dc:subject="<webwork:property value="/projectManager/project(long('project'))/string('name')" />"
    dc:description="<webwork:property value="@stringUtils/crop(./string('description'), 100, ' ...')" />"
    dc:date="<webwork:property value="@dateUtils/formatDateISO8601(timestamp('created'))" />"
    dc:identifier="<%= issueUrlViaId %>"
    trackback:ping="<webwork:property value="applicationProperties/string('jira.baseurl')"/>/rpc/trackback/<webwork:property value="string('key')"/>"/>

<rdf:Description rdf:about="<%= issueUrlViaKey %>"
    dc:title="[#<webwork:property value="string('key')" />] <webwork:property value="string('summary')" />"
    dc:subject="<webwork:property value="/projectManager/project(long('project'))/string('name')" />"
    dc:description="<webwork:property value="@stringUtils/crop(./string('description'), 100, ' ...')" />"
    dc:date="<webwork:property value="@dateUtils/formatDateISO8601(timestamp('created'))" />"
    dc:identifier="<%= issueUrlViaKey %>"
    trackback:ping="<webwork:property value="applicationProperties/string('jira.baseurl')"/>/rpc/trackback/<webwork:property value="string('key')"/>"/>
</rdf:RDF>-->



