Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Fixed: Preview of internal article is shown to customer in ticket ove…
Browse files Browse the repository at this point in the history
…rview screen (bug#13801).
  • Loading branch information
mbuc82 committed Apr 13, 2018
1 parent 7697dd6 commit 9f5f09e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
@@ -1,4 +1,5 @@
#6.0.7 2018-??-??
- 2018-04-13 Fixed bug#[13801](https://bugs.otrs.org/show_bug.cgi?id=13801) - Preview of internal article is shown to customer in ticket overview screen.
- 2018-04-11 Fixed bug#[13782](https://bugs.otrs.org/show_bug.cgi?id=13782) - Set of customer dynamic field not possible while adding a customer user if AutoLoginCreation is active.
- 2018-04-05 Fixed bug#[13126](https://bugs.otrs.org/show_bug.cgi?id=13126) - Process first activity cannot be changed to other activity.
- 2018-04-04 Fixed bug#[13735](https://bugs.otrs.org/show_bug.cgi?id=13735) - Custom Logo is not supported for High Contrast skin.
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Modules/CustomerTicketOverview.pm
Expand Up @@ -615,7 +615,8 @@ sub ShowTicketStatus {
my %LastNonInternalArticle;

my @ArticleList = $ArticleObject->ArticleList(
TicketID => $Param{TicketID},
TicketID => $Param{TicketID},
IsVisibleForCustomer => 1,
);

my $CommunicationChannelPattern = qr{Internal|Chat}xms;
Expand Down
28 changes: 28 additions & 0 deletions scripts/test/Selenium/Customer/CustomerTicketOverview.t
Expand Up @@ -47,6 +47,28 @@ $Selenium->RunTest(
"Ticket is created - $TicketID",
);

my $ArticleObject = $Kernel::OM->Get('Kernel::System::Ticket::Article');
my $ArticleBackendObject = $ArticleObject->BackendForChannel( ChannelName => 'Email' );

# Create test email article, invisible for customer.
my $InvisibleBody = 'invisible body';
my $ArticleID = $ArticleBackendObject->ArticleCreate(
TicketID => $TicketID,
SenderType => 'agent',
IsVisibleForCustomer => 0,
Subject => 'an article subject',
Body => $InvisibleBody,
Charset => 'ISO-8859-15',
MimeType => 'text/plain',
HistoryType => 'EmailCustomer',
HistoryComment => 'Some free text!',
UserID => 1,
);
$Self->True(
$ArticleID,
"ArticleCreate - ID $ArticleID",
);

# enable CustomerTicketOverviewSortable
$Helper->ConfigSettingChange(
Valid => 1,
Expand All @@ -72,6 +94,12 @@ $Selenium->RunTest(
"Ticket with ticket number $TicketNumber is found on screen with Open filter"
);

# Make sure the article body is not displayed (internal article).
$Self->True(
index( $Selenium->get_page_source(), $InvisibleBody ) == -1,
'Article body is not visible to customer',
);

# check All filter on CustomerTicketOverview screen
$Selenium->find_element(
"//a[contains(\@href, \'Action=CustomerTicketOverview;Subaction=MyTickets;Filter=All' )]"
Expand Down

0 comments on commit 9f5f09e

Please sign in to comment.