summaryrefslogtreecommitdiff
path: root/rt/docs/design_docs/CARS
diff options
context:
space:
mode:
Diffstat (limited to 'rt/docs/design_docs/CARS')
-rwxr-xr-xrt/docs/design_docs/CARS66
1 files changed, 66 insertions, 0 deletions
diff --git a/rt/docs/design_docs/CARS b/rt/docs/design_docs/CARS
new file mode 100755
index 0000000..a4d2a78
--- /dev/null
+++ b/rt/docs/design_docs/CARS
@@ -0,0 +1,66 @@
+Conditional Automated Request Shuffler
+Initial Design. <jesse@fsck.com> 9 Nov 99
+
+#Try to find out what queue the incoming ticket is in
+#Try to find out the default action for this invocation
+#Read the ticket from STDIN
+#Obtain the actor
+#Obtain the serial # if we have one
+#If the ticket has a ticket-id
+ #if this is a 'comment'
+ #add the current mime objects as a 'comment'
+
+ #if this is 'correspondence'
+ #add the current mime object as 'correspondence'
+
+
+#if this ticket does not yet have a ticket id
+
+ #For now:
+ #Create a new ticket
+
+ #In the distant future
+
+ #load the regexp table matching this queue
+ #check the message agains the regexp table, ordered by precedence
+ #when we get a match
+ #get the ruleset for that regexp from the actions table
+ #evaluate the ruleset in order of precedence.
+ #if we get an 'exit' stop proccesing ALL rulesets
+wpw #if we get a 'forward,' forward it to 'value'.
+
+ #if we get a 'create,' create a request in 'value'
+ #elseif we get a 'map', add this as additional correspondence on ticket 'value'
+
+
+ #if we get an 'associate', associate the ticket number returned from the
+ 'create' or 'map' with the master ticket from 'value'
+
+ #if we get a 'reply',
+ #load the reply template with id 'value'
+ #replace strings in the template
+ #send the template
+
+
+
+
+CREATE TABLE Rules {
+ID int AUTO_INCREMENT,
+Desc varchar(120),
+Regexp varchar(80),
+Precedence int,
+MatchField varchar(20), #Can be a headername or 'any' all header names
+ #end in :
+
+
+CREATE TABLE Actions {
+Rule int,
+Action varchar(20), # Create, Forward, Squelch, Owner, Area, Associate
+Value varchar(20), #queue or email address
+Desc varchar(120)
+}
+
+CREATE TABLE Autoreplies {
+ID int AUTO_INCREMENT,
+Content text
+); \ No newline at end of file