[Rt-commit] rtir branch, 4.0/incident-comment-rich-text, created. 4.0.0-31-gc32288e
Jim Brandt
jbrandt at bestpractical.com
Mon Jan 30 09:55:50 EST 2017
The branch, 4.0/incident-comment-rich-text has been created
at c32288eb957edf398a07d7a15942058a04d04251 (commit)
- Log -----------------------------------------------------------------
commit f045a066038f4b9b55ae074793b86dbfa4d65988
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Mon Jan 30 09:40:08 2017 -0500
Add test showing the incorrect editor is loaded for Incident comment
RT now defaults to the rich text editor, but the Incident comment
page loads the plain text editor. This test checks for the
correct editor.
diff --git a/t/001-basic-RTIR.t b/t/001-basic-RTIR.t
index b45ac4e..ebfd9b3 100644
--- a/t/001-basic-RTIR.t
+++ b/t/001-basic-RTIR.t
@@ -40,6 +40,14 @@ $agent->LinkChildToIncident( $report, $second_incident_id);
# TODO: verify in DB that report has 1 parent, and the right parent
+# Confirm we show the rich text editor for Incident comment since that is now
+# default for RT
+diag("Incident comment loaded rich text editor");
+{
+ ok($agent->display_ticket( $first_incident_id ), "Displayed incident ticket");
+ $agent->follow_link_ok({text => "Comment"}, "Followed link to comment");
+ $agent->content_contains("id=\"UpdateContentType\" value=\"text/html\"", "Update content type is html");
+}
undef $agent;
commit c32288eb957edf398a07d7a15942058a04d04251
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Mon Jan 30 09:50:20 2017 -0500
Remove Type arg from call to UpdateData template
The arg Type => Incident was being passed to the UpdateData
template, but that template didn't have Type in the args list
and wasn't using the value. However, it ended up being passed
along to RT's MessageBox template in %ARGS where it overrode
the Type arg there, which is used to indicate the Content Type for
the update. This resulted in the plain text comment box being displayed
even when rich text was configured in RT.
diff --git a/html/RTIR/Update.html b/html/RTIR/Update.html
index 1043301..369898c 100644
--- a/html/RTIR/Update.html
+++ b/html/RTIR/Update.html
@@ -148,7 +148,7 @@ jQuery( function() {
</tr>
% $ARGS{IncludeSignature} = 0 if $Action ne 'Respond' && !RT->Config->Get('MessageBoxIncludeSignatureOnComment');
-<& /RTIR/Elements/UpdateData, %ARGS, Ticket => $Ticket, Type => 'Incident', GnuPGWidget => $gnupg_widget &>
+<& /RTIR/Elements/UpdateData, %ARGS, Ticket => $Ticket, GnuPGWidget => $gnupg_widget &>
</table>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list