FogBugz - Assign bug to Virtual User

delphi package - automated exception handling
Post Reply
ThelmaCottage
Posts: 5
Joined: Tue May 24, 2016 4:27 pm

FogBugz - Assign bug to Virtual User

Post by ThelmaCottage »

Can ME assign to a Virtual User - doesn't seen to appear in drop down assign combo ?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: FogBugz - Assign bug to Virtual User

Post by madshi »

I'm not really a big FogBugz expert. I don't even know the concept of a Virtual User. However, you might be able to add this yourself. The FogBugz HTTP interface supports all kinds of "fields". E.g. some such fields are "sTitle", "sProject", "sArea" etc. You can add custom fields to this in a little exception handler (see madExcept.RegisterExceptionHandler) by doing "exceptIntf.AdditionalFields['sVirtualUserOrHoweverItIsNamed'] := 'whateverUser';". This should then also be transferred to FogBugz. You'd have to figure out how to transmit the virtual user to FogBugz. Probably it's some field like "sVirtualUser" or something like that. Maybe you can ask FogBugz support about it?
ThelmaCottage
Posts: 5
Joined: Tue May 24, 2016 4:27 pm

Re: FogBugz - Assign bug to Virtual User

Post by ThelmaCottage »

Thanks for that - didn't really want to start adding too much code to our app.

If we bought the commercial version could we edit the code for this feature ?

Mark
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: FogBugz - Assign bug to Virtual User

Post by madshi »

Yes, you could edit the code. But you'd have to redo the changes with every new build I release.

Would adding 5 lines of code to your app really be a problem? You could even create a little helper unit just for that, and include it in all your projects.
ThelmaCottage
Posts: 5
Joined: Tue May 24, 2016 4:27 pm

Re: FogBugz - Assign bug to Virtual User

Post by ThelmaCottage »

5 lines of code ? Is that all ? I'd appreciate an example :wink:
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: FogBugz - Assign bug to Virtual User

Post by madshi »

See the bottom of this page:

http://help.madshi.net/HowToUseMadExcept.htm

Just replace the one line of code in the handler with this:

Code: Select all

exceptIntf.AdditionalFields['sVirtualUserOrHoweverItIsNamed'] := 'whateverUser';
As I said, I don't know the exact key name for virtual users, you'd have to talk to FogBugz support about that.
ThelmaCottage
Posts: 5
Joined: Tue May 24, 2016 4:27 pm

Re: FogBugz - Assign bug to Virtual User

Post by ThelmaCottage »

I've been in touch with FB support and they say the parameter is 'sPersonAssignedTo'
So added exceptIntf.AdditionalFields['sPersonAssignedTo'] := 'Virtual User'; - this didn't work, just used the default user that was set-up in the 'upload to web server' setting - I guess this is being overwritten ?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: FogBugz - Assign bug to Virtual User

Post by madshi »

Ah, that one! Didn't know that "Virtual User" = "Assign To".

You can use "IMESettings.BugTrackerAssignTo := 'something';". In order to get an IMESettings interface, either use the function MESettings() globally, or use the "exceptIntf" parameter in an exception handler.
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: FogBugz - Assign bug to Virtual User

Post by FredS »

ThelmaCottage wrote:Can ME assign to a Virtual User - doesn't seen to appear in drop down assign combo ?
I use the BugzScout feature of FogBugz and all incoming goes to an inbox that automatically assigns it to a Virtual User.

In short you should be able to setup an incoming area for a Virtual User, no need to change code.
ThelmaCottage
Posts: 5
Joined: Tue May 24, 2016 4:27 pm

Re: FogBugz - Assign bug to Virtual User

Post by ThelmaCottage »

Yes, I was looking at BugZScout - do you place this in an exception handler ?
FredS
Posts: 98
Joined: Mon May 11, 2015 9:42 pm

Re: FogBugz - Assign bug to Virtual User

Post by FredS »

ThelmaCottage wrote:Yes, I was looking at BugZScout - do you place this in an exception handler ?
Yes, some code if it helps: viewtopic.php?f=4&t=28190
Post Reply