2

Closed

Root URL isn't enough to parse emailed links correctly

description

When tickets are updated/closed the links are not parsing correctly in the emails sent. I have bolded the text in the following block of code I had to add to tickets.aspx.cs to get them to work.
 
    {            sendToGroup = false;            subject = ddlPriority.SelectedItem.Text + " priority ticket number " + id + " has been closed";            body = submitterName + " (" + fromGroup + ") has closed ticket number " + id + ": " + title + ".   If this is incorrect, please re-open the ticket.\n\nhttp://" + rootUrl + "/SlickTicket/ticket.aspx?ticketID=" + id;        }        else        {            subject = "Ticket number " + id + " has been updated - assigned to " + toGroup;            body = submitterName + " (" + fromGroup + ") has updated ticket number " + id + ":\n" + title + "\n\n";            body += "Priority: " + _priority + "\n" + "Status: " + status;            body += "\n\nView the ticket:\nhttp://" + rootUrl + "/SlickTicket/ticket.aspx?ticketID=" + id;        }
 
Edit: The folder I installed ST into was e:\mis\SlickTicket as it is a component of the MIS website, and as such can not be assigned to have it's own internal root URL. The actual links are like http://companyweb/SlickTicket and http://companyweb/MIS while http://companyweb is the main page for the company itself. Were this an external site, it would be http://SlickTicket.ourdomain.com and generally be a non-issue but since it's intranet only I had to make this adjustment. Or I installed it wrong and this is what I had to do to cover that error. In any event - if you can't click your links that are emailed to you, try editing this file and adding this code.
 

 
Edit 2: I just had a thought - adding a setting in Preferences for "Installed Folder" would allow you to make the links read "\n\nView the ticket:\nhttp://" + rootUrl + installedFolder + "/ticket.aspx?ticketID=" + id; thereby allowing people to name that folder whatever they want without having to edit the code at all (sans adding http:// to the close ticket link). I'll attempt this soon and update this with how I did it once completed.
Closed May 28, 2010 at 2:21 PM by naspinski
Fixed in the newest source

comments