Hi Balram,
The following solution works on the object level so it should be more or less system-wide. For some reason it works perfectly with requests and incidents but not for problems, you'll have to sort out the problem issue yourself or just remove the problem part and be happy with it
So two files, the usual mod and spl files.
zdefault_pri.mod:
MODIFY cr priority ON_POST_VAL zreset_priority_default() 69 FILTER( EVENT("INSERT") );
zdefault_pri.spl:
cr.priority::zreset_priority_default(...) {
logf(MILESTONE, "cr::zreset_priority_default(): Started");
// Debug logging the argv
int i, default_priority;
for (i = 0; i < argc; i++){
logf(VERBOSE, "argv[%s]: %s", i, argv[i]);
}
logf(VERBOSE, "type: %s", type);
if (sindex(type, 'R') > -1){
default_priority = 1;
}
if (sindex(type, 'I') > -1){
default_priority = 3;
}
if (sindex(type, 'P') > -1){
default_priority = 5;
}
logf(VERBOSE, "Type is '%s', defaulting priority to %s", type, default_priority);
priority = default_priority;
}