Closed GWarsow closed 2 months ago
Would it be an option to call
return 1 if !%Article || !(exists $Article{CommunicationChannelID});
in https://github.com/znuny/Znuny/blob/944dda4cd387724bdbc1119c49f549742a4bdee6/Kernel/System/Ticket/Event/Mentions.pm#L50
Updated issue to issue template
@GWarsow , can you verify the issue again in 6.5.2? I cannot currently produces the issue. It's also for me not really clear. Here's what I did.
Install base system\ Create new ticket\ Merge into welcome ticket
Help me understand if that was what you did, and please verify again in 6.5.2.
This issue will be closed due to missing feedback.
Environment
Expected behaviour
No error should be logged, when merging a ticket.
Actual behaviour
An error is thrown:
How to reproduce
1) Merge freshly generated ticket into already existing ticket
Note: merging an already existing ticket, into the freshly created ticket, does not cause problems.
Additional information
when merging two tickets, we finally get to following lines https://github.com/znuny/Znuny/blob/944dda4cd387724bdbc1119c49f549742a4bdee6/Kernel/System/Ticket/Event/Mentions.pm#L46-L49 where an article is to be fetched via its TicketID and ArticleID. Problem is, that this article is the/one article to be merged from
TicketID
tootherTicketID
and this merging already took place. Accordingly, the article would have to be fetched viaArticleGet(otherTicketID, ArticleID)
. But sinceArticleGet(TicketID, ArticleID)
is called, we get no proper article object butwhich means that
return 1 if !%Article;
is not applied and we run into theNeed ChannelID or ChannelName!
as$Article{CommunicationChannelID}
isundef
.I do not know whether this is of importance, but the article to be merged is the one article of a freshly created ticket where ticket merging was triggered via a ArticleCreate Eventhandler. However, I assume this to be of importance since doing the merging the other way around (merging already existing ticket into the freshly created ticket) does not cause problems.
Could you please fix the incorrect behavior mentioned above?
Kind regards Gregor