0

My plugin is editing a case with CBug.Commit() and I want to then load the CBugEvent it just created. How can I get the ixBugEvent of my edit back from CBug.Commit() without having to use a CBugEventQuery?

flag

1 Answer

1

After you commit the edit, the ixBugEventLatest will be the ixBugEvent you want.

CBug bug = api.Bug.GetBug(ixBug);
bug.Commit("some edit text");
CBugEvent bugevent = api.BugEvent.GetBugEvent(bug.ixBugEventLatest);
link|flag
This should work even if events do get created between, as ixBugEventLatest won't be changed in this copy of the bug. – Ted Sep 9 2010 at 20:20
ah, yes I have a copy of the CBug, not a ref. thanks! – adambox Sep 10 2010 at 20:57

Your Answer

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