projects
/
manu
/
RT-Extension-Drafts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5e61c7d
)
Fix drafts loading for RT 4.4.x
author
Emmanuel Lacour
<elacour@easter-eggs.com>
Mon, 4 Apr 2016 11:43:06 +0000
(13:43 +0200)
committer
Emmanuel Lacour
<elacour@easter-eggs.com>
Mon, 4 Apr 2016 11:43:06 +0000
(13:43 +0200)
html/Callbacks/Drafts/Ticket/Display.html/BeforeDisplay
patch
|
blob
|
history
html/Callbacks/Drafts/Ticket/Update.html/AfterMessageBox
patch
|
blob
|
history
html/Callbacks/Drafts/Ticket/Update.html/Initial
patch
|
blob
|
history
diff --git
a/html/Callbacks/Drafts/Ticket/Display.html/BeforeDisplay
b/html/Callbacks/Drafts/Ticket/Display.html/BeforeDisplay
index
243d848
..
f3638a5
100644
(file)
--- a/
html/Callbacks/Drafts/Ticket/Display.html/BeforeDisplay
+++ b/
html/Callbacks/Drafts/Ticket/Display.html/BeforeDisplay
@@
-4,7
+4,7
@@
if ($$ARGSRef{'id'} ne 'new'){
my $Ticket = LoadTicket($$ARGSRef{'id'});
if ( $$ARGSRef{'UpdateContent'} ) {
my $Draft = RT::Attribute->new( $session{'CurrentUser'} );
my $Ticket = LoadTicket($$ARGSRef{'id'});
if ( $$ARGSRef{'UpdateContent'} ) {
my $Draft = RT::Attribute->new( $session{'CurrentUser'} );
- $Draft->LoadByNameAndObject( Object => $session{'CurrentUser'}, Name => 'Draft-'.$Ticket->id );
+ $Draft->LoadByNameAndObject( Object => $session{'CurrentUser'}
->UserObj
, Name => 'Draft-'.$Ticket->id );
$Draft->Delete if ( $Draft && $Draft->Id );
}
}
$Draft->Delete if ( $Draft && $Draft->Id );
}
}
diff --git
a/html/Callbacks/Drafts/Ticket/Update.html/AfterMessageBox
b/html/Callbacks/Drafts/Ticket/Update.html/AfterMessageBox
index
e92c773
..
2a92f3c
100644
(file)
--- a/
html/Callbacks/Drafts/Ticket/Update.html/AfterMessageBox
+++ b/
html/Callbacks/Drafts/Ticket/Update.html/AfterMessageBox
@@
-6,7
+6,7
@@
my $Ticket = LoadTicket($ARGS{'id'});
my $Draft = RT::Attribute->new( $session{'CurrentUser'} );
my $Ticket = LoadTicket($ARGS{'id'});
my $Draft = RT::Attribute->new( $session{'CurrentUser'} );
-$Draft->LoadByNameAndObject( Object => $session{'CurrentUser'}, Name => 'Draft-'.$Ticket->id );
+$Draft->LoadByNameAndObject( Object => $session{'CurrentUser'}
->UserObj
, Name => 'Draft-'.$Ticket->id );
if ( $ARGS{'SaveDraft'} ) {
if ( $Draft && $Draft->Id ) {
if ( $ARGS{'SaveDraft'} ) {
if ( $Draft && $Draft->Id ) {
@@
-14,7
+14,7
@@
if ( $ARGS{'SaveDraft'} ) {
$Draft->SetContentType( $ARGS{'UpdateContentType'} || 'text/plain' );
} else {
$Draft->Create( Name => 'Draft-'.$Ticket->id,
$Draft->SetContentType( $ARGS{'UpdateContentType'} || 'text/plain' );
} else {
$Draft->Create( Name => 'Draft-'.$Ticket->id,
- Object => $session{'CurrentUser'},
+ Object => $session{'CurrentUser'}
->UserObj
,
Content => $ARGS{'UpdateContent'},
ContentType => $ARGS{'UpdateContentType'} || 'text/plain',
);
Content => $ARGS{'UpdateContent'},
ContentType => $ARGS{'UpdateContentType'} || 'text/plain',
);
diff --git
a/html/Callbacks/Drafts/Ticket/Update.html/Initial
b/html/Callbacks/Drafts/Ticket/Update.html/Initial
index
85e3b88
..
093fca6
100644
(file)
--- a/
html/Callbacks/Drafts/Ticket/Update.html/Initial
+++ b/
html/Callbacks/Drafts/Ticket/Update.html/Initial
@@
-2,7
+2,7
@@
my $Ticket = LoadTicket($$ARGSRef{'id'});
if ( $$ARGSRef{'LoadDraft'} ) {
my $Draft = RT::Attribute->new( $session{'CurrentUser'} );
my $Ticket = LoadTicket($$ARGSRef{'id'});
if ( $$ARGSRef{'LoadDraft'} ) {
my $Draft = RT::Attribute->new( $session{'CurrentUser'} );
- $Draft->LoadByNameAndObject( Object => $session{'CurrentUser'}, Name => 'Draft-'.$Ticket->id );
+ $Draft->LoadByNameAndObject( Object => $session{'CurrentUser'}
->UserObj
, Name => 'Draft-'.$Ticket->id );
$$ARGSRef{'UpdateContent'} = $Draft->Content if ( $Draft && $Draft->Content );
$$ARGSRef{'UpdateContentType'} = $Draft->ContentType if ( $Draft && $Draft->ContentType );
}
$$ARGSRef{'UpdateContent'} = $Draft->Content if ( $Draft && $Draft->Content );
$$ARGSRef{'UpdateContentType'} = $Draft->ContentType if ( $Draft && $Draft->ContentType );
}