Add Impact, Group, Comment Select for Remedy Trouble Ticket

Description

Add the ability to the user that is opening a ticket on remedy to select the destination group, the impact and to add a comment.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Antonio Russo February 12, 2013 at 1:30 AM

This has been done in Remedy Trouble Ticket integration in features/TN branch. It has not been merged in features/TN-master branch for dependency management.
The code itself is really easy to implement...

Just add the following to the end of opennms-webapp/src.main/webapp/WEB-INF/jsp/alarm/detail.jsp:

MacBook-Pro-di-Antonio-Russo:opennms antonio$ diff opennms-webapp/src/main/webapp/WEB-INF/jsp/alarm/detail.jsp /opt/opennms/jetty-webapps/opennms/WEB-INF/jsp/alarm/detail.jsp
41c41,44
< org.opennms.web.springframework.security.Authentication"

> org.opennms.web.springframework.security.Authentication,
> org.apache.commons.configuration.Configuration,
> org.apache.commons.configuration.ConfigurationException,
> org.apache.commons.configuration.PropertiesConfiguration"
365a369,391
> <% if ("org.opennms.netmgt.ticketer.remedy.RemedyTicketerPlugin".equalsIgnoreCase(Vault.getProperty("opennms.ticketer.plugin")) && (alarm.getTroubleTicketState() == null || alarm.getTroubleTicketState().toString().equals("CREATE_FAILED") )) { %>
> <input type="hidden" name="nodelabel" value="<%=alarm.getNodeLabel()%>"/>
> <input type="text" name="remedy.user.comment" value="Add a Comment here"/>
> <select name="remedy.urgency">
> <option value="1-Critical">1-Critical</option>
> <option value="2-High">2-High</option>
> <option value="3-Medium">3-Medium</option>
> <option value="4-Low" selected="selected">4-Low</option>
> </select>
> <select name="remedy.assignedgroup">
> <% String propsFile = new String(Vault.getProperty("opennms.home") + "/etc/remedy.properties");
>
> Configuration remedyConfig = null;
> try {
> remedyConfig = new PropertiesConfiguration(propsFile);
> } catch (final ConfigurationException e) {
> }
> for (String group: remedyConfig.getString("remedy.targetgroups").split(":")) { %>
> %>
> <option value="<%=group%>"><%=group%></option>
> <% } %>
> </select>
> <% } //Remedy Specific Trouble Ticket %>

The problem is the import (at run time works) of :

> org.apache.commons.configuration.Configuration,
> org.apache.commons.configuration.ConfigurationException,
> org.apache.commons.configuration.PropertiesConfiguration

while the apache-common configuration is not a dependency for opennms-webapp the compilation of detail.jsp fails.

Won't Fix

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created February 12, 2013 at 1:24 AM
Updated April 3, 2015 at 3:38 PM
Resolved October 1, 2014 at 11:49 AM