1

1

Hello,

I'd like to add a field to the left of a case with a customer name to be able to track which of our customers that have most cases assigned to them etc.

I'd like this to be a combobox with values fetched from our CRM database, this should be fairly easy to do by making my own plugin and just select the customer names. However, we have a lot of customers registered (6000) since we handle both companies and private persons, and sending 6000+ names every roundtrip a case goes is just not viable.

Then I thought I'd like a textbox like the parent and subcase fields where it exists a lookup when you start to write. This lookup uses some kind of ajax to find strings in some field in the database and should reduce the data traffic sent.

How do I do if I wan't to add this kind of lookup/autocomplete field when making a plugin?

Also, I know about the custom fields plugin but it does not seem to provide what I need.

flag
Noone? This can't be very unique, wanting to tie together business data between systems. – André Apr 28 2010 at 6:55

2 Answers

1

Here is the approach I would use to solve this problem:

I agree that fetching the full list on every page view would be a lot of unnecessary work and traffic. You can instead store the list in a plugin table (using IPluginDatabase). You would then implement IPluginHeartbeatTask or IPluginDailyTask to have your plugin update the list periodically.

In the case edit mode (IPluginBugDisplay), you can show the field and use AJAX (served up by your plugin's raw page display) to search the list and autocomplete.

Note that the Bugfield library makes adding a custom field much simpler than doing it manually (and it automatically adds a search axis and filter and grid view features). Right now the documentation is not complete. We should have something up soon. See FogCreek.Plugins.BugField here.

I would store and index number corresponding to the particular customer name in the bugfield's custom field, and then store the list of names and any other info you need in another plugin table.

The Bugfield library lets you define only a few methods, and the library takes care of the rest. You will likely want to define (override) some of them for the custom behavior you need to do the ajax search, and to join in the names.

If you need help with the details of implementation, please let us know.

link|flag
0

Hello adam,

Thanks for your suggestions. However I can't find anything about the BugField in the api documentation.

Secondly: Does it give me any advantage to copy the data from our crm database to fogbugz database, isn't it possible to connect the bugfield directly to the crm db?

link|flag

Your Answer

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