[Rt-commit] rt branch, 4.2/fix-organization-for-all-links, repushed
Jim Brandt
jbrandt at bestpractical.com
Fri Feb 28 16:58:59 EST 2014
The branch 4.2/fix-organization-for-all-links was deleted and repushed:
was c7dc9aa791b5192389e3e16fbd98ef1f10bdc6bf
now 6bd765254618e045ee58e5cb499d210a97b2c8e4
1: fb647e0 = 1: fb647e0 Update tests to reflect API consistent with ticket links
2: 6d5a075 = 2: 6d5a075 Update article URI API to be consistent with ticket URI API
3: d4a4317 = 3: d4a4317 Warn if we parse an id but can't load the article
4: 71ab3bf = 4: 71ab3bf Move article object validation to cover entire method
5: 11f646a ! 5: 03b6ad6 Validate Organization change for article and other types of links
@@ -1,26 +1,15 @@
Author: Jim Brandt <jbrandt at bestpractical.com>
- Validate article and other types of links
+ Validate Organization change for article and other types of links
- Check non-ticket links for a changed Organization and
- for links to missing objects like Articles. Use %INC
- to find loaded RT::URI subclasses to catch link types that
- might be loaded from an extension like Assets.
+ Check non-ticket links for a changed Organization.
- Add Article to the models checked since Articles are part of
- RT now.
+ Use %INC to find loaded RT::URI subclasses to catch link types
+ that might be loaded from an extension like Assets.
diff --git a/sbin/rt-validator.in b/sbin/rt-validator.in
--- a/sbin/rt-validator.in
+++ b/sbin/rt-validator.in
-@@
-
- my @models = qw(
- ACE
-+ Article
- Attachment
- Attribute
- CachedGroupMember
@@
{ model => 'Link', column => 'Base' },
);
@@ -35,35 +24,6 @@
@@
last; # plenty of chances we covered all cases with one update
- }
- }
-+ } # end foreach my $package (@rt_uris)
- return $res;
- };
-
-@@
- { model => 'Link', column => 'Base' },
- );
-
-- my $rt_uri = RT::URI::fsck_com_rt->new( $RT::SystemUser );
-+ my @rt_uris = rt_uri_modules();
-+ foreach my $package (@rt_uris) {
-+
-+ my $rt_uri = $package->new( $RT::SystemUser );
- my $scheme = $rt_uri->Scheme;
- my $prefix = $rt_uri->LocalURIPrefix;
-
-@@
-
- my $tprefix = $prefix .'/'. ($tclass eq 'RT::Ticket'? 'ticket' : $tclass) .'/';
-
-+ $tprefix = $prefix . '/article/' if $tclass eq 'RT::Article';
-+
- my $query = "SELECT s.id FROM $stable s LEFT JOIN $ttable t "
- ." ON t.id = ". sql_str2int("SUBSTR(s.$scolumn, ?)")
- ." WHERE s.$scolumn LIKE ? AND t.id IS NULL";
-@@
- }
}
}
+ } # end foreach my $package (@rt_uris)
-: ------- > 6: f5e009e Detect and offer to clean up links to missing articles
6: 19cfd13 = 7: 581c375 Add indent for new foreach loops
7: c7dc9aa = 8: 6bd7652 Fix indent. Whitespace-only change
More information about the rt-commit
mailing list