[Rt-commit] rt branch, master, updated. rt-4.1.6-205-g4af46c8
Alex Vandiver
alexmv at bestpractical.com
Tue Feb 5 15:32:20 EST 2013
The branch, master has been updated
via 4af46c8429f19188093a317472066789ab437dba (commit)
via c1779fdfeff68db59c74f4ed1bd616bbf28e3ce5 (commit)
via 85b0041863cb0c0f1f22deb1e9aee49b540df554 (commit)
via 070012f1dbf85082d78fad66f9fd68b167244294 (commit)
via 8b3b06302625b410702f28259cf840773abeaa71 (commit)
via 0b1ea4a68e6a608ebfe1cc46a8dd7a765a2696ee (commit)
via c39a3456e136f446eeb994f317a9246dd540c097 (commit)
via c48a81a08e5ecc0cb402f6771a514ec46e2c35bc (commit)
via 12c550e441993347cd4855a4c25b35b0d6b6a6e8 (commit)
via d0a2fb60eebb07ad194c7e3fbcbfc2a94e80678d (commit)
via 9ef27079a00598df41a48a6e1d11dde5a486826d (commit)
via 68e04dd8b9b83b891530263fe45e433c5bcd5f1c (commit)
via fa5b8be7dcc26f12656e775726e302a75e417504 (commit)
via 47ad38bd4611512a2aba5e881ccc6d14cfb3df4b (commit)
via 9ddbdfffd130ad8265a1f476b09a8a9f95e65c53 (commit)
via 48489a2aaf9ff0da50f63a786cc4ce506ea75d4b (commit)
via 06763623061bac028f05c089b07b12e254ad1f6d (commit)
via 79967378a88f50bdab534bc15847e3a05309a99e (commit)
via 6f911cc7f23a97c98b46ee95b7cc6968aa88b8e4 (commit)
via 11c49f6f1f0a2b86815d3e8963eff4ec3d5f20be (commit)
via 2a85d827adaf1863b5fb304e548bb54eaaf6358b (commit)
via fb5009893b3f66362788728d170d584aa0210e07 (commit)
via 06f26b7fcab1c2614769d91beefcf3a4d41e5166 (commit)
via c7f24fa9dbd2b17ed9f8dd01aea7e773ca073bdc (commit)
via 1c2d9024b9138e953a8e0a930f68075980dfd2d1 (commit)
via 222a10e7cfd9d59ae8a6196938ad730c1fd0458d (commit)
via cc9562317aa87d0b3d31b0cdbebed1de9795cd3e (commit)
via 6d5b035891caa7f42f9d434183c8843788b4e244 (commit)
via 398e3e73eee4f2430650bb9e217eeb6d50f893f1 (commit)
via d6ce43a679e678a7ea9180aa45f95c7fb5fdc569 (commit)
via ee616f8b9cfa7fe79886604ce30867254a1565e8 (commit)
via 4323db240af294d0d86e8b8d9e37e5ba5c9a22a8 (commit)
via 7bc451c8b12752c2554109db836fe3b80e24d1b9 (commit)
via aed5ba8a91afc22eab5d7104992a877a75250011 (commit)
via cc5efed7f55c53ac2391492db333792a41fb8dd5 (commit)
via 529eaf4e93d07c0acf704d969d07bac444bab0da (commit)
via 8b7880554a6590ebb1f5e981f187da3b0465e798 (commit)
via 59fea8dc0624349c6feb64d9df2f07836ca1d1eb (commit)
via 6b85e35fde8c2495e9d20752a6b6ab8dc5ad6971 (commit)
via 2167f43f2331a627741e9b427a8016321cc2d43b (commit)
via ebeed9ffab81b944dff74e9422d07e9483a80b0e (commit)
via 9ba85baab99419a26c583a87f9d235d54465954f (commit)
via ad6a1a8415c332671d68448c3db27046481178b9 (commit)
from 88a7d3614d31cb895f081232a43df64d8bff8dfe (commit)
Summary of changes:
lib/RT/Attachment.pm | 4 +-
lib/RT/Class.pm | 2 +-
lib/RT/Handle.pm | 8 +-
lib/RT/Record.pm | 7 +-
lib/RT/Reminders.pm | 10 +
lib/RT/Search/Googleish.pm | 2 +-
lib/RT/Ticket.pm | 7 +-
lib/RT/Transaction.pm | 6 +-
lib/RT/User.pm | 59 +-
sbin/rt-setup-database.in | 5 +-
share/html/Elements/Footer | 2 +-
share/html/Elements/RT__Queue/ColumnMap | 1 +
share/html/Elements/ShowReminders | 1 +
share/html/Search/Bulk.html | 2 +-
share/html/Search/Elements/BuildFormatString | 3 +-
share/html/Ticket/Elements/Reminders | 3 +-
share/html/m/_elements/footer | 2 +-
share/po/ar.po | 964 ++++----
share/po/bg.po | 934 ++++----
share/po/cs.po | 2518 +++++++-------------
share/po/da.po | 932 ++++----
share/po/de.po | 936 ++++----
share/po/el.po | 944 ++++----
share/po/en.po | 2 +-
share/po/en_GB.po | 711 +++---
share/po/es.po | 934 ++++----
share/po/et.po | 950 ++++----
share/po/fi.po | 934 ++++----
share/po/fr.po | 934 ++++----
share/po/he.po | 940 ++++----
share/po/hr.po | 932 ++++----
share/po/hu.po | 940 ++++----
share/po/id.po | 936 ++++----
share/po/is.po | 944 ++++----
share/po/it.po | 932 ++++----
share/po/ja.po | 944 ++++----
share/po/lt.po | 934 ++++----
share/po/lv.po | 940 ++++----
share/po/mk.po | 952 ++++----
share/po/nb.po | 932 ++++----
share/po/nl.po | 932 ++++----
share/po/nn.po | 934 ++++----
share/po/oc.po | 950 ++++----
share/po/pl.po | 932 ++++----
share/po/pt.po | 936 ++++----
share/po/pt_BR.po | 934 ++++----
share/po/pt_PT.po | 948 ++++----
share/po/rt.pot | 944 ++++----
share/po/ru.po | 934 ++++----
share/po/{oc.po => sk.po} | 3284 +++++++++++++-------------
share/po/sl.po | 934 ++++----
share/po/sv.po | 944 ++++----
share/po/tr.po | 942 ++++----
share/po/zh_CN.po | 932 ++++----
share/po/zh_TW.po | 932 ++++----
t/api/transaction.t | 52 +
t/web/reminders.t | 25 +-
t/web/ticket_display.t | 14 +-
58 files changed, 19958 insertions(+), 18688 deletions(-)
copy share/po/{oc.po => sk.po} (76%)
create mode 100644 t/api/transaction.t
- Log -----------------------------------------------------------------
commit 4af46c8429f19188093a317472066789ab437dba
Merge: 88a7d36 c1779fd
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Feb 5 15:29:03 2013 -0500
Merge branch '4.0-trunk'
Conflicts:
lib/RT/Interface/Web.pm
lib/RT/Reminders.pm
lib/RT/Transaction.pm
share/html/Search/Elements/BuildFormatString
share/html/Ticket/Elements/Reminders
share/html/Ticket/Elements/ShowSummary
share/html/Ticket/Reminders.html
diff --cc lib/RT/Record.pm
index c9bbb94,0310475..6a44aa2
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@@ -1816,11 -1593,16 +1816,16 @@@ sub CustomFieldLookupId
# Save a ->Load call by not calling ->FooObj->Id, just ->Foo
my $final = shift @classes;
foreach my $class (reverse @classes) {
- my $method = "${class}Obj";
- $object = $object->$method;
+ my $method = "${class}Obj";
+ $object = $object->$method;
}
- return $object->$final;
+ my $id = $object->$final;
+ unless (defined $id) {
+ my $method = "${final}Obj";
+ $id = $object->$method->Id;
+ }
+ return $id;
}
diff --cc lib/RT/Reminders.pm
index 83f7fb4,42f4e1d..5ee3d8e
--- a/lib/RT/Reminders.pm
+++ b/lib/RT/Reminders.pm
@@@ -116,19 -116,18 +116,29 @@@ sub Add
@_
);
+ my $ticket = RT::Ticket->new($self->CurrentUser);
+ $ticket->Load($self->Ticket);
+ if ( !$ticket->id ) {
+ return ( 0, $self->loc( "Failed to load ticket [_1]", $self->Ticket ) );
+ }
+
+ if ( $ticket->Status eq 'deleted' ) {
+ return ( 0, $self->loc("Can't link to a deleted ticket") );
+ }
+
+ return ( 0, $self->loc('Permission Denied') )
+ unless $self->CurrentUser->HasRight(
+ Right => 'CreateTicket',
+ Object => $self->TicketObj->QueueObj,
+ )
+ && $self->CurrentUser->HasRight(
+ Right => 'ModifyTicket',
+ Object => $self->TicketObj,
+ );
+
my $reminder = RT::Ticket->new($self->CurrentUser);
- my ( $status, $msg ) = $reminder->Create(
+ # the 2nd return value is txn id, which is useless here
+ my ( $status, undef, $msg ) = $reminder->Create(
Subject => $args{'Subject'},
Owner => $args{'Owner'},
Due => $args{'Due'},
diff --cc lib/RT/Transaction.pm
index c32264d,5407542..f90e9c9
--- a/lib/RT/Transaction.pm
+++ b/lib/RT/Transaction.pm
@@@ -844,13 -777,8 +844,12 @@@ sub _FormatUser
my $value;
if ( $self->NewValue ) {
my $URI = RT::URI->new( $self->CurrentUser );
- $URI->FromURI( $self->NewValue );
- if ( $URI->Resolver ) {
+ if ( $URI->FromURI( $self->NewValue ) ) {
- $value = $URI->Resolver->AsString;
+ $value = [
+ \'<a href="', $URI->AsHREF, \'">',
+ $URI->Resolver->AsString,
+ \'</a>'
+ ];
}
else {
$value = $self->NewValue;
@@@ -887,13 -815,8 +886,12 @@@
my $value;
if ( $self->OldValue ) {
my $URI = RT::URI->new( $self->CurrentUser );
- $URI->FromURI( $self->OldValue );
- if ( $URI->Resolver ) {
- if ( $URI->FromURI( $self->OldValue ) ){
- $value = $URI->Resolver->AsString;
++ if ( $URI->FromURI( $self->OldValue ) ) {
+ $value = [
+ \'<a href="', $URI->AsHREF, \'">',
+ $URI->Resolver->AsString,
+ \'</a>'
+ ];
}
else {
$value = $self->OldValue;
diff --cc share/html/Ticket/Elements/Reminders
index 1fb2eda,37b360b..7f5a108
--- a/share/html/Ticket/Elements/Reminders
+++ b/share/html/Ticket/Elements/Reminders
@@@ -116,15 -112,11 +115,15 @@@ my $reminder_collection = $count_remind
% }
% }
- % if ( $Ticket->QueueObj->CurrentUserHasRight('CreateTicket') && $Ticket->CurrentUserHasRight('ModifyTicket') ) {
-% if ($Ticket->Status ne "deleted") {
++% if ($Ticket->Status ne "deleted" and $Ticket->QueueObj->CurrentUserHasRight('CreateTicket') and $Ticket->CurrentUserHasRight('ModifyTicket') ) {
<&|/l&>New reminder:</&>
<& SELF:NewReminder, Ticket => $Ticket &>
+% $editable = 1;
+% }
+
+% if ( $editable && $ShowSave ) {
+<div align="right"><input type="submit" class="button" value="<&|/l&>Save</&>" /></div>
% }
-% return($Ticket->Status ne "deleted" or $visible);
<%method NewReminder>
<%args>
$Ticket
diff --cc t/web/reminders.t
index b07aefc,af7e2fb..251272b
--- a/t/web/reminders.t
+++ b/t/web/reminders.t
@@@ -26,6 -26,23 +26,23 @@@ $m->goto_ticket($ticket->id)
$m->form_name('UpdateReminders');
$m->field( 'NewReminder-Subject' => "baby's first reminder" );
$m->submit;
-$m->content_contains("Reminder 'baby's first reminder' added");
++$m->content_contains("Reminder 'baby's first reminder': Created");
+
+ $ticket->SetStatus('deleted');
+ is( $ticket->Status, 'deleted', 'deleted ticket' );
+ $m->form_name('UpdateReminders');
+ $m->field( 'NewReminder-Subject' => "link to a deleted ticket" );
+ $m->submit;
+ $m->content_contains("Can't link to a deleted ticket");
+ $m->get_ok('/Tools/MyReminders.html');
+ $m->content_contains( "baby's first reminder",
+ 'got the reminder even the ticket is deleted' );
+
+ $m->goto_ticket( $ticket->id );
+ $m->content_lacks('New reminder:', "can't create a new reminder");
+ $m->text_contains('Check box to complete', "we DO display this text when there are reminders");
+ $m->content_like(qr{<th[^>]*>Reminders?</th>}, "now we have a reminder titlebar");
+ $m->text_contains("baby's first reminder", "display the reminder's subject");
my $reminders = RT::Reminders->new($user);
$reminders->Ticket($ticket->id);
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list