Post date: Jul 14, 2015 3:48:11 PM
The program provides a way to track work order updates in the system log so that, using a query, you can see exactly what work order data was updated at exactly what time by which user. This can be helpful if you are trying to audit exactly who saved what information on work orders. The logging generated shows every database update to the work order header AND to each work order detail line. See the steps below to turn on and use this logging:
Step 1 - Turn on work order update logging
Edit (use a text editor) the file called web.xml - you can find this under your tomcat web server folders at:
../tomcat/webapps/sm/WEB-INF/web.xml
You'll see a section, near the top, that looks like this:
<context-param>
<param-name>logworkorderupdates</param-name>
<param-value>false</param-value>
<description>
'True' to cause the program to log every database update to a work order (for diagnostic purposes). Anything other than 'True' turns off that logging.
</description>
</context-param>
Change the line that says:
<param-value>false</param-value>
to
<param-value>True</param-value>
(To turn the logging OFF, set the value back to 'false' as in the first example above.)
Step 2 - Restart the tomcat web server
After the web.xml setting is changed, you need to restart the tomcat server to make it take effect.
Step 3 - Run the query
Whenever you have a question about a particular work order, you can run this query (below) to get a list of all the updates made to the work order header or work order details for that work order. The query will prompt you for a work order number.
QUERY:
select * from systemlog
where (
(sLoggingOperation = 'WOSAVEDEBUG')
AND (INSTR(sLoggingDescription, '[[Enter a work order number:]]') > 0)
) order by iLoggingID
Step 4 - Examine the query results
The query will list, in chronological order, every change made to the work order header and details, showing the username, date, time, the screen from which it was done, and the EXACT SQL command that altered the data.
If you are looking for a particular field, for example, the 'additional comments' field, you can search the query results for that field and see what the value of that field was changed to with each event.
The exact field names for the entire SMCP program can be found by going to the SM Query Selector (1101) screen, and clicking on 'Display Data Definitions'.
Most of the entries start off, in the 'sLoggingDescription' field with a digit, so they might look like this:
2 WOID: 12345....
This initial digit indicates which screen was used to make the update - there are 4 possible screens used to update the work order, and they are numbered this way:
When the work order was updated from the 'Work Order Edit' screen (the one mechanics use) the digit will be 0.
When creating a work order or saving from the CONFIGURE screen, the digit will be 1.
When the work order update happened from the IMPORT screen, the digit will be 2.
When the work order was updated by MOVING a job on the schedule screen, the digit will be 3.
When the work order was updated from the ACCEPT SIGNATURE screen, the digit will be 4'