[rt-users] [PATCH] sorting by custom fields
Ruslan Zakirov
ruz at bestpractical.com
Mon Mar 31 23:51:49 EDT 2008
Hi, users,
Last few days I was hacking on a solution and have something for you to try.
1) New release of DBIx::SearchBuilder. You can download it from the
CPAN near you soon or using
http://pause.cpan.org/incoming/DBIx-SearchBuilder-1.52.tar.gz .
I really recommend you to run make test against your DB server before
installing it. Do the following:
perl Makefile.PL
make
SB_TEST_MYSQL=db_to_test_in SB_TEST_MYSQL_USER=test_user
SB_TEST_MYSQL_PASS=password make test
Where "db_to_test" is the name of the DB you're going to test against,
test files will create temporary tables in that DB. To run it safe use
clean DB or DB you use for other experiments, *DON"T RUN TESTS ON
ANY DB THAT HAS PRODUCTION DATA*.
Other valid prefixes for ENV vars are SB_TEST_ORACLE, SB_TEST_PG and
SB_TEST_SQLITE.
Once it succeeded you can run `make install` command.
After installing you have to stop and start your web server
to apply the changes.
2) As well I attach patch for RT that should add link to titles of
custom field columns in search results. So you can click those to order
by a CF and change ordering. To see the change you have to purge mason
cache, just drop me a note if you don't know how.
After installing sorting should be correct in almost all
situations, but I know at least one issue when it's not true. The order
is wrong when you sort by CF X, limit search by this CF and it can
have multiple values. I'm working on a fix for this.
Waiting for your feedback.
--
Best regards, Ruslan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RT-3.6.6-allow_sort_by_cf_from_results.patch
Type: application/octet-stream
Size: 440 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080401/29872118/attachment.obj>
More information about the rt-users
mailing list