- Oct 30, 2019
-
-
JediKev authored
This addresses an ORM failure where upon refetching an object from the database that no longer exists the system crashes hard. We use the `one()` method which expects one result, if there is no result it throws a `DoesNotExist` exception. We are not catching the exception properly which crashes osTicket and forces you to clear the session via browser or database.
-
- Apr 22, 2019
-
-
aydreeihn authored
-
- Oct 22, 2018
-
-
Peter Rotich authored
This commits adds ability to add extra joins to a queryset. If the join has constraints then it's LEFT joined otherwise straight JOIN is assumed. This is necessary to fix queue counts for queues with keyword search.
-
Jared Hancock authored
This patch adds a few changes. First, the full-text search query is refactored so that MySQL can focus first on finding matching records in its full-text search index (in the %_search table) in a subquery. Then it can focus on matching records against tickets in an outer query (whether ticket data, thread entries, user info, or organization inf was matched). This dramatically speeds up the query for large datasets by about 20x (about three seconds instead of sixty-something). Secondly, results are now sorted based on relevance, so the best hits sort a the top of the list. This is accomplished by adding the `relevance` to the query sort list via the extra() method. Then, since no GROUP BY clause is really necessary, it is not added to the query, which will allow the results not to be re-sorted by the ticket_id. (That is, the remain sorted by the search relevance). Third, the relevance has a lower limit of 0.3. Good hits seem to have a much larger value (like hundreds), so setting a small value will help to remove hits with barely any relevance to the search terms.
-
Jared Hancock authored
This changes the organization of the ticket queue query. It places the criteria of the queue and the access criteria based on the staff in a query by itself. Then it joins to that query and selects the columns and annotations in the outer query. This seems to help MySQL focus on the query in two stages. The first is to find the one page of results to be shown on the page, and the second is to find all the information to be shown for each ticket.
-
Jared Hancock authored
If there are annotations in an SQL statement, but there are no aggregate functions used (such as SUM, COUNT, etc), then a GROUP BY clause is not technically required. Using one implies sorting of the results to ensure uniqueness--prior to sorting them according to the requested sort in the ORDER BY clause.
-
Jared Hancock authored
This adds the advanced option to the queue sort configuration. An index can be specified to be used for the sorting operation. In some cases, the MySQL query optimizer cannot select the most efficient index to use when dealing with large querysets and sorting. This feature, if enabled, allows an administrator to specify an index which MySQL should use when using the sort. To use the feature, an `extra` column must be added to the `%queue_sort` table to receive the index name.
-
- Sep 05, 2018
-
-
Peter Rotich authored
-
- Aug 28, 2018
-
-
aydreeihn authored
-
- Jul 06, 2018
-
-
Peter Rotich authored
-
- May 15, 2018
-
-
Jared Hancock authored
This fixes an error where the ModelInstanceManager maintained a reference to the QuerySet instance, and the QuerySet instance managed a reference to the ModelInstanceManager instance (if it's the iterator for the query). Because of the circular reference, if the iterator is not exhausted, then the resource is not closed and the query remains open. This wastes memory and prevents some other queries from running after such a situation happens. This addresses the issue by removing the circular reference between the QuerySet and the ModelInstanceManager.
-
- May 02, 2018
-
-
Peter Rotich authored
COALESCE sort fields when a column has multiple data sources.
-
- Apr 19, 2018
-
-
Jared Hancock authored
This fixes an error where the ModelInstanceManager maintained a reference to the QuerySet instance, and the QuerySet instance managed a reference to the ModelInstanceManager instance (if it's the iterator for the query). Because of the circular reference, if the iterator is not exhausted, then the resource is not closed and the query remains open. This wastes memory and prevents some other queries from running after such a situation happens. This addresses the issue by removing the circular reference between the QuerySet and the ModelInstanceManager.
-
- Mar 22, 2018
-
-
Peter Rotich authored
-
- Mar 12, 2018
-
-
aydreeihn authored
-
- Oct 30, 2017
-
-
Jared Hancock authored
Adds the ability to "Clone" a queue, which would be nice to create a queue similar to the current one with a couple distinct settings, but also not a child of the queue. Also adds the ability to add a "Sub Queue" to the current queue, which will allow easy creation of queues which are pre-configured for inheritance.
-
Jared Hancock authored
-
Jared Hancock authored
- Fix crash on new ticket - Fix crash on user and org dialog popup from ticket - Fix missing queue mass-action buttons
-
Jared Hancock authored
This originates from an ORM issue, where the select_related in a queryset was not honored by the compiler. Therefore, the query would not include all the fields requested and would require extra trips to the database for some queries. This is especially important for unbuffered queries, such as those used in the export process, which be fetched in parallel with other queries.
-
Jared Hancock authored
This patch implements Nathan's mockups for adding sorting options to the custom queues. The sort drop-down feature was added for v1.10. This patch adds the complex sort dropdown back into the custom queue feature, but also makes the sorting options customizable.
-
Jared Hancock authored
-
Jared Hancock authored
This adds support for the SQL_CALC_FOUND_ROWS hint and the following FOUND_ROWS() call to fetch the total ticket count for a ticket queue without asking the database to run the same query twice. References: http://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_found-rows
-
Jared Hancock authored
-
Jared Hancock authored
-
Jared Hancock authored
-
Jared Hancock authored
* Drop per item edit and delete links * Add drop-down links for edit and delete after queue title * Fix crash on queues with keyword searches * Fix menu collapse with several top-level queues. "Search" and "New Ticket" are always shown on the nav bar * Update queue `path` on update * Include cascaded parent's criteria when displaying inherited criteria * Show inherited criteria on saved search edit dialog
-
Jared Hancock authored
This fixes a problem where viewing a queue with no defined columns would result in attempting to add columns to the queue, which would result in an incorrect SQL statement and an email sent to the administrator. This was ultimately moot because columns are not added directly to the queue anymore.
-
Jared Hancock authored
-
Jared Hancock authored
-
Jared Hancock authored
-
Jared Hancock authored
This is a new concept for many-to-many relationships, where the extra fields from the middle table can be overlaid over the related model using the AnnotatedModel paradigm. The overlaid fields are writable and updates are saved to the middle model. This is performed using a new ::wrap method of the AnnotatedModel class. AnnotatedModel::wrap($what, $overlay, [$class]) Which will create a new class which is a subclass of `$what`, and will have the extra properties in `$overlay` accessible as normal properties. `$overlay` can be an array or a VerySimpleModel instance. The latter is required for writable overlays.
-
Jared Hancock authored
-
Jared Hancock authored
This adds support for adding "personal" queues underneath any top-level queue with automatic criteria inheritance.
-
Jared Hancock authored
-
Jared Hancock authored
Attempt to only use parentheses in WHERE clauses and friends when mixing ANDed and ORed constraints
-
Jared Hancock authored
-
Jared Hancock authored
-
Jared Hancock authored
-
Jared Hancock authored
-
Jared Hancock authored
-