Index: trunk/src/python/unifiedlogger/extend_unifiedlogger.py
===================================================================
--- trunk/src/python/unifiedlogger/extend_unifiedlogger.py	(revision 542)
+++ trunk/src/python/unifiedlogger/extend_unifiedlogger.py	(revision 544)
@@ -1,5 +1,4 @@
 import xml.etree.ElementTree as ET
 import os, ConfigParser
-
 
 config = ConfigParser.ConfigParser()
@@ -8,5 +7,5 @@
 
 # read in the incident script in XML format
-tree = ET.parse(logfilepath + 'incident_script.xml')
+tree = ET.parse(logfilepath + 'incident_script_test.xml')
 # root is TMC_SCRIPT tag 
 root = tree.getroot()
@@ -40,23 +39,22 @@
                     # Look for CAD_INCIDENT_EVENT
                     if event.tag == 'CAD_INCIDENT_EVENT':
-                        # count variable make sure there is as least a field 
-                        # inside CAD_INCIDENT_EVENT 
-                        count = 0
+                        # set flag to check if DETAIL field exist
+                        detail = False
                         for info in event:
-                            count += 1
-                            # Aad the incident detail to entry string 
+                            # Add the incident detail to entry string 
                             if info.tag == "DETAIL":
-                                entry_str += ", Detail: " + info.text 
-                            else:
-                                # if no detail found then reset string
-                                entry_str = ""
-                        # if no field inside CAD_INCIDENT_EVENT 
-                        # reset the string 
-                        if count == 0:
-                            entry_str = ""
+                                # replace commas with whitespace
+                                text = info.text.replace(",", " ")
+                                # if it's not the first DETAIL field, 
+                                # append to the end without "Detail" text
+                                if detail:
+                                    entry_str += "; " + text
+                                else:
+                                    entry_str += ", Detail: " + text
+                                detail = True
                         
-                        # if entry_str contain some info
+                        # if there's detail field
                         # add it to the entries 
-                        if entry_str != "":
+                        if detail:
                             entries += entry_str + "\n"
 # write all the entries from incident_sript.xml to the output file 
@@ -75,2 +73,3 @@
 os.system("sort -o " + logfilepath + "caddetails.csv " \
     + logfilepath + "caddetails.csv")
+                            
