-
Alex Vandiver authored
If the hash passed to ->LoadFromHash does not contain a key for category, any code which later calls ->Category on the object will turn around and attempt to ask the database. This is precisely what EditCustomFieldSelect does, of course. For External CFs, this is both slow _and_ wrong -- it will always ask for CustomFieldValue id #1, and will do so repeatedly, for every external CF value provided. This incurs a significant performance penalty on ticket creation and updates, as listing the full set of external values suddenly incurs hundreds of extraneous database queries. Ensure that a value for category exists for all external CFs, to save the erroneous trip to the database.
45ea9086