[Rt-commit] r13018 - in rt/branches/3.8-TESTING: share/html/Elements share/html/Ticket
jesse at bestpractical.com
jesse at bestpractical.com
Sat Jun 7 02:02:31 EDT 2008
Author: jesse
Date: Sat Jun 7 02:02:31 2008
New Revision: 13018
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/share/html/Elements/ShowLinks
rt/branches/3.8-TESTING/share/html/Ticket/Create.html
Log:
r32442 at 31b: jesse | 2008-06-07 02:00:18 -0400
* Back down ticket cloning a bit to where users seemed to want it. clone refers to/referred to by but not other attributes
Modified: rt/branches/3.8-TESTING/share/html/Elements/ShowLinks
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/ShowLinks (original)
+++ rt/branches/3.8-TESTING/share/html/Elements/ShowLinks Sat Jun 7 02:02:31 2008
@@ -118,21 +118,27 @@
. '&CloneTicket='
. $Ticket->id;
+
for my $relation (
- qw(MemberOf Members DependsOn DependedOnBy RefersTo ReferredToBy))
-{
+ qw(RefersTo ReferredToBy)) {
my $mode = $RT::Ticket::LINKTYPEMAP{$relation}->{Mode};
my $type = $RT::Ticket::LINKTYPEMAP{$relation}->{Type};
my $other = "Local" . $mode;
my $field = $mode eq 'Base' ? 'new-' . $type : $type . '-new';
$clone->{$field}
- = $path
- . "&$field="
+ = $path . "&$field="
. join( '%20',
( map { $_->$other() } @{ $Ticket->$relation->ItemsArrayRef } ),
$Ticket->id );
}
+for my $relation ( qw(MemberOf Members DependsOn DependedOnBy)) {
+ my $mode = $RT::Ticket::LINKTYPEMAP{$relation}->{Mode};
+ my $type = $RT::Ticket::LINKTYPEMAP{$relation}->{Type};
+ my $field = $mode eq 'Base' ? 'new-' . $type : $type . '-new';
+ $clone->{$field} = $path . "&$field=". $Ticket->id ;
+}
+
</%INIT>
<%ARGS>
Modified: rt/branches/3.8-TESTING/share/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Ticket/Create.html (original)
+++ rt/branches/3.8-TESTING/share/html/Ticket/Create.html Sat Jun 7 02:02:31 2008
@@ -267,17 +267,6 @@
my $members = $CloneTicketObj->Members;
my ( @members, @members_of, @refers, @refers_by, @depends, @depends_by );
- while ( my $member = $members->Next ) {
- push @members, $member->LocalBase;
- }
- $clone->{'MemberOf-new'} = join ' ', @members;
-
- my $members_of = $CloneTicketObj->MemberOf;
- while ( my $member_of = $members_of->Next ) {
- push @members_of, $member_of->LocalTarget;
- }
- $clone->{'new-MemberOf'} = join ' ', @members_of;
-
my $refers = $CloneTicketObj->RefersTo;
while ( my $refer = $refers->Next ) {
push @refers, $refer->LocalTarget;
@@ -289,20 +278,31 @@
push @refers_by, $refer_by->LocalBase;
}
$clone->{'RefersTo-new'} = join ' ', @refers_by;
-
- my $depends = $CloneTicketObj->DependsOn;
- while ( my $depend = $depends->Next ) {
- push @depends, $depend->LocalTarget;
- }
- $clone->{'new-DependsOn'} = join ' ', @depends;
-
- my $depends_by = $CloneTicketObj->DependedOnBy;
- while ( my $depend_by = $depends_by->Next ) {
- push @depends_by, $depend_by->LocalBase;
+ if (0) { # Temporarily disabled
+ my $depends = $CloneTicketObj->DependsOn;
+ while ( my $depend = $depends->Next ) {
+ push @depends, $depend->LocalTarget;
+ }
+ $clone->{'new-DependsOn'} = join ' ', @depends;
+
+ my $depends_by = $CloneTicketObj->DependedOnBy;
+ while ( my $depend_by = $depends_by->Next ) {
+ push @depends_by, $depend_by->LocalBase;
+ }
+ $clone->{'DependsOn-new'} = join ' ', @depends_by;
+
+ while ( my $member = $members->Next ) {
+ push @members, $member->LocalBase;
+ }
+ $clone->{'MemberOf-new'} = join ' ', @members;
+
+ my $members_of = $CloneTicketObj->MemberOf;
+ while ( my $member_of = $members_of->Next ) {
+ push @members_of, $member_of->LocalTarget;
+ }
+ $clone->{'new-MemberOf'} = join ' ', @members_of;
+
}
- $clone->{'DependsOn-new'} = join ' ', @depends_by;
-
-
my $cfs = $CloneTicketObj->QueueObj->TicketCustomFields();
while ( my $cf = $cfs->Next ) {
More information about the Rt-commit
mailing list