[Rt-commit] rtir branch, 2.9-trunk, updated. 2.6.1rc1-267-g3a0ae38
Ruslan Zakirov
ruz at bestpractical.com
Thu Aug 18 09:56:12 EDT 2011
The branch, 2.9-trunk has been updated
via 3a0ae38c53ec34aeaba7f4064691c08574ed49b1 (commit)
via 81bfd177efe11b2059c788ab7409a4d2a971d258 (commit)
via 8812825eda1b16c406e53a6d6b74a8277c91ac3b (commit)
via 3097a5feab1b802ebead0069a6638ba89567b872 (commit)
via d10bbab1eab67a8f89f28bf6b313876e23417474 (commit)
via 4a95b02ae1c55c096190d836676ad4008987d5b0 (commit)
via df43bd027888d9538554e3bd2eff2d8062fbfeef (commit)
via 4ae0fccd93218108c9f1d65fddf5a87f88fff2ab (commit)
from 03c2456781cd106f6723bdec74737c3383a4c15a (commit)
Summary of changes:
html/RTIR/Create.html | 7 +++----
html/RTIR/Edit.html | 7 ++-----
html/RTIR/Elements/EditCustomFields | 12 +++++-------
html/RTIR/Incident/Create.html | 7 +++----
html/RTIR/Incident/Edit.html | 7 ++-----
html/RTIR/Incident/Elements/Create | 10 ++++------
html/RTIR/Investigation/Elements/Create | 12 +++++++-----
7 files changed, 26 insertions(+), 36 deletions(-)
- Log -----------------------------------------------------------------
commit 4ae0fccd93218108c9f1d65fddf5a87f88fff2ab
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 02:34:05 2011 +0400
trailing comma in %ARGS block is bad
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index c9b1fdb..bd7219d 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -139,7 +139,7 @@ email addresses. These people <b>will</b> receive future updates.)</&></font></i
<%ARGS>
$NamePrefix => ''
-$QueueObj => undef,
+$QueueObj => undef
%HideField => ()
%SkipField => ()
</%ARGS>
commit df43bd027888d9538554e3bd2eff2d8062fbfeef
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 02:41:12 2011 +0400
always call RTIR's EditCustomFields
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index c1f0bc9..b0e42af 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -96,7 +96,7 @@
<tr>
<td colspan="2">
- <& /Ticket/Elements/EditCustomFields, TicketObj => $Ticket &>
+ <& /RTIR/Elements/EditCustomFields, TicketObj => $Ticket &>
</td>
</tr>
</table>
diff --git a/html/RTIR/Incident/Edit.html b/html/RTIR/Incident/Edit.html
index bc37db9..9ed7c0d 100644
--- a/html/RTIR/Incident/Edit.html
+++ b/html/RTIR/Incident/Edit.html
@@ -81,7 +81,7 @@
<tr>
<td colspan="2">
- <& /Ticket/Elements/EditCustomFields, TicketObj => $Ticket &>
+ <& /RTIR/Elements/EditCustomFields, TicketObj => $Ticket &>
</td>
</tr>
</table>
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index bd7219d..bb5f16b 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -48,7 +48,7 @@
% }
% if ( ($QueueObj || $ARGS{'TicketObj'}) && !$SkipField{'CustomFields'} ) {
-<& /Ticket/Elements/EditCustomFields,
+<& /RTIR/Elements/EditCustomFields,
NamePrefix => $NamePrefix,
TicketObj => $ARGS{'TicketObj'},
QueueObj => $QueueObj,
commit 4a95b02ae1c55c096190d836676ad4008987d5b0
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 02:45:54 2011 +0400
always pass %ARGS into EditCustomFields
diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index ca03938..d7ccd3d 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -140,6 +140,7 @@
% }
<& /RTIR/Elements/EditCustomFields,
+ %ARGS,
TicketObj => $SplitObj,
QueueObj => $QueueObj,
$Split ? ( OnCreate => 1 ) : (),
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index b0e42af..4161e26 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -96,7 +96,7 @@
<tr>
<td colspan="2">
- <& /RTIR/Elements/EditCustomFields, TicketObj => $Ticket &>
+ <& /RTIR/Elements/EditCustomFields, %ARGS, TicketObj => $Ticket &>
</td>
</tr>
</table>
diff --git a/html/RTIR/Incident/Edit.html b/html/RTIR/Incident/Edit.html
index 9ed7c0d..5579558 100644
--- a/html/RTIR/Incident/Edit.html
+++ b/html/RTIR/Incident/Edit.html
@@ -81,7 +81,7 @@
<tr>
<td colspan="2">
- <& /RTIR/Elements/EditCustomFields, TicketObj => $Ticket &>
+ <& /RTIR/Elements/EditCustomFields, %ARGS, TicketObj => $Ticket &>
</td>
</tr>
</table>
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index bb5f16b..92e6b73 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -49,6 +49,7 @@
% if ( ($QueueObj || $ARGS{'TicketObj'}) && !$SkipField{'CustomFields'} ) {
<& /RTIR/Elements/EditCustomFields,
+ %ARGS,
NamePrefix => $NamePrefix,
TicketObj => $ARGS{'TicketObj'},
QueueObj => $QueueObj,
commit d10bbab1eab67a8f89f28bf6b313876e23417474
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 02:51:51 2011 +0400
make sure all EditCustomFields calls are in table
use InTable layout in RTIR
diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index d7ccd3d..af75868 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -145,7 +145,6 @@
QueueObj => $QueueObj,
$Split ? ( OnCreate => 1 ) : (),
$IncidentObj ? ( IncidentObj => $IncidentObj ) : (),
- AsTable => 1,
&>
</table></&></div>
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index 4161e26..ef7d635 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -94,11 +94,8 @@
</tr>
% }
- <tr>
- <td colspan="2">
- <& /RTIR/Elements/EditCustomFields, %ARGS, TicketObj => $Ticket &>
- </td>
- </tr>
+ <& /RTIR/Elements/EditCustomFields, %ARGS, TicketObj => $Ticket &>
+
</table>
</&>
diff --git a/html/RTIR/Elements/EditCustomFields b/html/RTIR/Elements/EditCustomFields
index 40ac199..4aed4a9 100644
--- a/html/RTIR/Elements/EditCustomFields
+++ b/html/RTIR/Elements/EditCustomFields
@@ -26,6 +26,7 @@
TicketObj => $TicketObj,
QueueObj => $QueueObj,
%ARGS,
+ InTable => 1,
&>
<%INIT>
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 77a46e3..73a3f15 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -134,8 +134,6 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
%ARGS,
QueueObj => $QueueObj,
ChildObj => $ChildObj,
- AsTable => 1,
- InTable => 1,
&>
</table></&></div>
diff --git a/html/RTIR/Incident/Edit.html b/html/RTIR/Incident/Edit.html
index 5579558..faa152d 100644
--- a/html/RTIR/Incident/Edit.html
+++ b/html/RTIR/Incident/Edit.html
@@ -79,11 +79,8 @@
</tr>
% }
- <tr>
- <td colspan="2">
- <& /RTIR/Elements/EditCustomFields, %ARGS, TicketObj => $Ticket &>
- </td>
- </tr>
+ <& /RTIR/Elements/EditCustomFields, %ARGS, TicketObj => $Ticket &>
+
</table>
</&>
diff --git a/html/RTIR/Incident/Elements/Create b/html/RTIR/Incident/Elements/Create
index 04537c1..0902707 100644
--- a/html/RTIR/Incident/Elements/Create
+++ b/html/RTIR/Incident/Elements/Create
@@ -52,7 +52,6 @@
TicketObj => $TicketObj,
QueueObj => $QueueObj,
ChildObj => $ChildObj,
- AsTable => 1,
&>
<%INIT>
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 92e6b73..ad8b25d 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -54,7 +54,6 @@
TicketObj => $ARGS{'TicketObj'},
QueueObj => $QueueObj,
CFIDPrefix => $NamePrefix,
- AsTable => 1,
&>
% }
commit 3097a5feab1b802ebead0069a6638ba89567b872
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 04:18:08 2011 +0400
make sure on create TicketObj is undef
diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index af75868..b7c5f8f 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -141,7 +141,7 @@
<& /RTIR/Elements/EditCustomFields,
%ARGS,
- TicketObj => $SplitObj,
+ TicketOnj => undef,
QueueObj => $QueueObj,
$Split ? ( OnCreate => 1 ) : (),
$IncidentObj ? ( IncidentObj => $IncidentObj ) : (),
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 73a3f15..c3a55ba 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -132,6 +132,7 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
<& /RTIR/Elements/EditCustomFields,
%ARGS,
+ TicketObj => undef,
QueueObj => $QueueObj,
ChildObj => $ChildObj,
&>
diff --git a/html/RTIR/Incident/Elements/Create b/html/RTIR/Incident/Elements/Create
index 0902707..1666847 100644
--- a/html/RTIR/Incident/Elements/Create
+++ b/html/RTIR/Incident/Elements/Create
@@ -47,9 +47,9 @@
</td></tr>
% }
-<& /RTIR/Elements/EditCustomFields,
+<& /RTIR/Elements/EditCustomFields,
%ARGS,
- TicketObj => $TicketObj,
+ TicketObj => undef,
QueueObj => $QueueObj,
ChildObj => $ChildObj,
&>
@@ -60,7 +60,6 @@ my $constituency_cf = RT::IR->CustomFields( 'Constituency', Queue => $QueueObj->
<%ARGS>
$NamePrefix => ''
$QueueObj => undef
-$TicketObj => undef
$ChildObj => undef
$Subject => ''
</%ARGS>
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index ad8b25d..f474cd9 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -50,8 +50,8 @@
% if ( ($QueueObj || $ARGS{'TicketObj'}) && !$SkipField{'CustomFields'} ) {
<& /RTIR/Elements/EditCustomFields,
%ARGS,
+ TicketObj => undef,
NamePrefix => $NamePrefix,
- TicketObj => $ARGS{'TicketObj'},
QueueObj => $QueueObj,
CFIDPrefix => $NamePrefix,
&>
commit 8812825eda1b16c406e53a6d6b74a8277c91ac3b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 04:21:06 2011 +0400
if ticket is not loaded then ->QueueObj is no good
diff --git a/html/RTIR/Elements/EditCustomFields b/html/RTIR/Elements/EditCustomFields
index 4aed4a9..b6e24ee 100644
--- a/html/RTIR/Elements/EditCustomFields
+++ b/html/RTIR/Elements/EditCustomFields
@@ -32,7 +32,6 @@
<%INIT>
unless ( $TicketObj && $TicketObj->Id ) {
# no ticket, we need to find defaults of cfs
- $QueueObj ||= $TicketObj->QueueObj();
my $CustomFields = $QueueObj->TicketCustomFields();
my %Defaults = RT->Config->Get('RTIR_CustomFieldsDefaults');
while ( my $CustomField = $CustomFields->Next ) {
commit 81bfd177efe11b2059c788ab7409a4d2a971d258
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 04:25:23 2011 +0400
use one argument to take default CF values from
diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index b7c5f8f..f2c69da 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -143,8 +143,7 @@
%ARGS,
TicketOnj => undef,
QueueObj => $QueueObj,
- $Split ? ( OnCreate => 1 ) : (),
- $IncidentObj ? ( IncidentObj => $IncidentObj ) : (),
+ DefaultsFrom => $SplitObj || $IncidentObj,
&>
</table></&></div>
diff --git a/html/RTIR/Elements/EditCustomFields b/html/RTIR/Elements/EditCustomFields
index b6e24ee..cba91f0 100644
--- a/html/RTIR/Elements/EditCustomFields
+++ b/html/RTIR/Elements/EditCustomFields
@@ -37,14 +37,13 @@ unless ( $TicketObj && $TicketObj->Id ) {
while ( my $CustomField = $CustomFields->Next ) {
my $name = $CustomField->Name;
- if ( $ChildObj || $IncidentObj ) {
- my $linking_to = $ChildObj || $IncidentObj;
- my ($link_cf) = RT::IR->CustomFields( Field => $name, Ticket => $linking_to );
+ if ( $DefaultsFrom ) {
+ my ($link_cf) = RT::IR->CustomFields( Field => $name, Ticket => $DefaultsFrom );
if ( $link_cf ) {
# XXX: if CF can have only one value then we should use only first value
$ARGS{"CustomField-".$CustomField->Id} = join "\n",
grep defined && length, map $_->Content,
- @{ $linking_to->CustomFieldValues( $link_cf->id )->ItemsArrayRef };
+ @{ $DefaultsFrom->CustomFieldValues( $link_cf->id )->ItemsArrayRef };
next;
}
}
@@ -73,6 +72,5 @@ unless ( $TicketObj && $TicketObj->Id ) {
<%ARGS>
$TicketObj => undef
$QueueObj => undef
-$ChildObj => undef
-$IncidentObj => undef
+$DefaultsFrom => undef
</%ARGS>
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index c3a55ba..91430c5 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -132,9 +132,9 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
<& /RTIR/Elements/EditCustomFields,
%ARGS,
- TicketObj => undef,
- QueueObj => $QueueObj,
- ChildObj => $ChildObj,
+ TicketObj => undef,
+ QueueObj => $QueueObj,
+ DefaultsFrom => $SplitObj || $ChildObj,
&>
</table></&></div>
diff --git a/html/RTIR/Incident/Elements/Create b/html/RTIR/Incident/Elements/Create
index 1666847..e3b840f 100644
--- a/html/RTIR/Incident/Elements/Create
+++ b/html/RTIR/Incident/Elements/Create
@@ -49,9 +49,9 @@
<& /RTIR/Elements/EditCustomFields,
%ARGS,
- TicketObj => undef,
- QueueObj => $QueueObj,
- ChildObj => $ChildObj,
+ TicketObj => undef,
+ QueueObj => $QueueObj,
+ DefaultsFrom => $ChildObj,
&>
<%INIT>
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index f474cd9..484e2ee 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -47,12 +47,13 @@
</table></&></td></tr>
% }
-% if ( ($QueueObj || $ARGS{'TicketObj'}) && !$SkipField{'CustomFields'} ) {
+% if ( ($QueueObj || $TicketObj) && !$SkipField{'CustomFields'} ) {
<& /RTIR/Elements/EditCustomFields,
%ARGS,
TicketObj => undef,
NamePrefix => $NamePrefix,
QueueObj => $QueueObj,
+ DefaultsFrom => $TicketObj,
CFIDPrefix => $NamePrefix,
&>
% }
@@ -140,6 +141,7 @@ email addresses. These people <b>will</b> receive future updates.)</&></font></i
<%ARGS>
$NamePrefix => ''
$QueueObj => undef
+$TicketObj => undef
%HideField => ()
%SkipField => ()
</%ARGS>
commit 3a0ae38c53ec34aeaba7f4064691c08574ed49b1
Merge: 4ae0fcc 81bfd17
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Aug 18 17:55:48 2011 +0400
Merge branch '3.0/unify-edit-custom-fields-calls' into 2.9-trunk
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list