[Bps-public-commit] RT-Extension-rt_cpan_org branch, rt4, updated. fbb75e7f9e54f4b1bcda4bba0882c9d8527687ee
Thomas Sibley
trs at bestpractical.com
Wed Apr 10 20:56:22 EDT 2013
The branch, rt4 has been updated
via fbb75e7f9e54f4b1bcda4bba0882c9d8527687ee (commit)
via 1a0aeebd5b384dd8a123657fd4693bd476033b04 (commit)
via 36d15189201c0725119bcfdeec31f752217df838 (commit)
from 4914d4f8f1fd237c527102618d4435ab1dbd26a8 (commit)
Summary of changes:
bin/rt-cpan-export-db | 12 ++++--------
html/Callbacks/rt_cpan_org/Elements/Footer/Default | 6 ++++++
html/NoAuth/css/rt.cpan.org.css | 5 +++--
3 files changed, 13 insertions(+), 10 deletions(-)
- Log -----------------------------------------------------------------
commit 36d15189201c0725119bcfdeec31f752217df838
Author: Thomas Sibley <trs at bestpractical.com>
Date: Wed Apr 10 15:13:30 2013 -0700
Information about sponsors
diff --git a/html/Callbacks/rt_cpan_org/Elements/Footer/Default b/html/Callbacks/rt_cpan_org/Elements/Footer/Default
index 27e3436..95142ad 100644
--- a/html/Callbacks/rt_cpan_org/Elements/Footer/Default
+++ b/html/Callbacks/rt_cpan_org/Elements/Footer/Default
@@ -1 +1,7 @@
+<p id="sponsors">
+ This service is sponsored and maintained by
+ <a href="http://bestpractical.com">Best Practical Solutions</a> and runs on
+ <a href="http://noc.perl.org">Perl.org</a> infrastructure.
+</p>
+
<& /Elements/ContactInfo &>
diff --git a/html/NoAuth/css/rt.cpan.org.css b/html/NoAuth/css/rt.cpan.org.css
index 865283a..ad7e8de 100644
--- a/html/NoAuth/css/rt.cpan.org.css
+++ b/html/NoAuth/css/rt.cpan.org.css
@@ -108,15 +108,16 @@ tt {
font-size: 1.2em;
}
-#contact-info {
+#contact-info, #sponsors {
color: white;
text-shadow: 1px 1px #444;
padding: 1em 1em 0 0;
margin: 0;
text-align: right;
+ font-size: 1.1em;
}
-#contact-info a { color: white }
+#contact-info a, #sponsors a { color: white }
a { text-decoration: underline; }
commit 1a0aeebd5b384dd8a123657fd4693bd476033b04
Author: Thomas Sibley <trs at bestpractical.com>
Date: Wed Apr 10 17:16:35 2013 -0700
Improve the query for exporting tickets to SQLite
Using RT::Tickets without using FromSQL often leads to ugly and
unexpected behaviour due to the internals. While that underlying
problem should be fixed, it isn't happening anytime soon.
By switching to a combination of FromSQL and the explicit "vanilla"
versions of Join/Limit, we pick up the standard set of limits that
FromSQL implies:
Status != deleted
AND EffectiveId = id
AND Type = ticket
The status limit prevents "Deep recursion" warnings triggered by
RT::Tickets::Next skipping over deleted tickets in long runs. The other
two limits improve the accuracy of the export by eliminating tickets
merged into other tickets and not counting reminders or approvals that
may have strayed into the database.
While the switch from Join/_SQLLimit to the RT::SearchBuilder:: versions
is not strictly necessary, I think it enhances the explicitness of
what's effectively happening and avoids touching the "ticketsql"
subclause added by FromSQL.
diff --git a/bin/rt-cpan-export-db b/bin/rt-cpan-export-db
index 815ba8b..1bb19de 100755
--- a/bin/rt-cpan-export-db
+++ b/bin/rt-cpan-export-db
@@ -147,18 +147,13 @@ sub fetch_next {
sub default_search {
my $last_seen = shift || 0;
my $tickets = RT::Tickets->new( $RT::SystemUser );
- $tickets->_SQLLimit(
- ENTRYAGGREGATOR => 'AND',
- FIELD => 'id',
- OPERATOR => '>',
- VALUE => $last_seen,
- );
- my $queues = $tickets->Join(
+ $tickets->FromSQL("id > $last_seen");
+ my $queues = $tickets->RT::SearchBuilder::Join(
FIELD1 => 'Queue',
TABLE2 => 'Queues',
FIELD2 => 'id',
);
- $tickets->_SQLLimit(
+ $tickets->RT::SearchBuilder::Limit(
ENTRYAGGREGATOR => 'AND',
ALIAS => $queues,
FIELD => 'Disabled',
commit fbb75e7f9e54f4b1bcda4bba0882c9d8527687ee
Author: Thomas Sibley <trs at bestpractical.com>
Date: Wed Apr 10 17:25:07 2013 -0700
Mark the ticket export query join as distinct to avoid a performance penalty
This eliminates the need for a temporary table.
diff --git a/bin/rt-cpan-export-db b/bin/rt-cpan-export-db
index 1bb19de..ad6ea9c 100755
--- a/bin/rt-cpan-export-db
+++ b/bin/rt-cpan-export-db
@@ -159,6 +159,7 @@ sub default_search {
FIELD => 'Disabled',
VALUE => 0,
);
+ $tickets->{joins_are_distinct} = 1;
$tickets->OrderBy( FIELD => 'id', ORDER => 'ASC' );
$tickets->RowsPerPage( PAGE_SIZE );
return $tickets;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list