0

I'm writing a plugin that executes specific actions on case events based on specific criteria. I'd like to be able to compare a field's before and after values in a case event. For example, I'd like to know if the priority of a case has changed and possibly whether it changed from or to a specific value during a case event. I've tried looking at the field values in BugCommitBefore, but as far as I can tell they are not the previous values. Is there a way to do this?

flag
I've worked around this by parsing the BugEvent.sChanges field using Bug.ixBugEventLatest, but if there's a better way to do it, I like to know. – Josh O'Brien Jun 16 2011 at 20:18

1 Answer

1

During a BugCommit event (for example), you should be able to check the "before" value of a field by using bug.QueryField("field name"). Note that you'll need to set bug.IgnorePermissions to True before calling that method.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.