[Rt-commit] rt branch, 4.4/disabled-cf-sortorder, repushed
? sunnavy
sunnavy at bestpractical.com
Mon Mar 5 18:09:54 EST 2018
The branch 4.4/disabled-cf-sortorder was deleted and repushed:
was 7fd4f490e1d0eeb6a6d5fd94a06ed896004bbe8a
now a1cc40c9267e3df1d4eef5590b3540d8db924532
1: 64addf7b6 = 1: 64addf7b6 Test showing incorrect sort order on re-enabled CF
2: 9e4e31abc = 2: 9e4e31abc Reset ObjectCustomField sort order when re-enabling a Custom Field
3: 7fd4f490e ! 3: a1cc40c92 update ObjectCustomField sort order only if necessary when re-enabling a Custom Field
@@ -15,7 +15,7 @@
- my $sort = $ocf->NextSortOrder();
- $ocf->SetSortOrder($sort);
- RT::Logger->debug("Set Sort Order to $sort for Object Custom Field " . $ocf->Id);
-+ my $last_object = $ocf->LastObject() || $ocf;
++ my $last_object = $ocf->LastSibling || $ocf;
+ # no need to update if it's already the last one.
+ if ( $ocf->id != $last_object->id || $last_object->IsSortOrderShared ) {
+ my $sort = $last_object->SortOrder + 1;
@@ -40,13 +40,13 @@
sub NextSortOrder {
+ my $self = shift;
-+ my $last_object = $self->LastObject( @_ );
++ my $last_object = $self->LastSibling( @_ );
+ return 0 unless $last_object;
+ return $last_object->SortOrder + 1;
+}
+
+
-+=head3 LastObject
++=head3 LastSibling
+
+Returns the object with maximum SortOrder in the L<neighborhood|/Neighbors>.
+Pass arguments to L</Neighbors> and can take optional ObjectId argument,
@@ -54,7 +54,7 @@
+
+=cut
+
-+sub LastObject {
++sub LastSibling {
my $self = shift;
my %args = (@_);
More information about the rt-commit
mailing list