Good Evening,
we are challenging a Problem for a few weeks now. We have a Webservice as an Interface which is inserting articles for a specific Ticket. Everything works fine but in TicketZoom the Articles are in the wrong order. I wanted to change the default sort to be sorted by Date not by Article Number. How can i achieve that?
As Attachment i have two screenshots - the first one is sorted by Number "1,2,3" but it's not correct when you look on the date.
The other is sorted by Date and would be correct but you can see the order of the Numbers changed to "1,3,2".
Thanks for any information.
TicketZoom - Article order by create Date
Moderator: crythias
-
- Znuny newbie
- Posts: 28
- Joined: 22 May 2015, 08:32
- Znuny Version: 5.0.25
- Real Name: David Stockinger
TicketZoom - Article order by create Date
You do not have the required permissions to view the files attached to this post.
Re: TicketZoom - Article order by create Date
Hi,
I don't think that's possible without editing core source files. I would assume it can probably be done by editing /Kernel/Modules/AgentTicketZoom.pm and/or /Kernel/Output/HTML/Templates/Standard/AgentTicketZoom.tt
But I'm not sure that should even be happening, because I would assume that the article number is added automatically and in sequence, so it should match the chronological order in which the articles get created. But I'm not an OTRS dev so I'm not 100% sure about this.
Does the webservice interface you're using to add articles also send any kind of date as a parameter?
I don't think that's possible without editing core source files. I would assume it can probably be done by editing /Kernel/Modules/AgentTicketZoom.pm and/or /Kernel/Output/HTML/Templates/Standard/AgentTicketZoom.tt
But I'm not sure that should even be happening, because I would assume that the article number is added automatically and in sequence, so it should match the chronological order in which the articles get created. But I'm not an OTRS dev so I'm not 100% sure about this.
Does the webservice interface you're using to add articles also send any kind of date as a parameter?
-
- Znuny newbie
- Posts: 28
- Joined: 22 May 2015, 08:32
- Znuny Version: 5.0.25
- Real Name: David Stockinger
Re: TicketZoom - Article order by create Date
I thought that too but i can't find any numbers in the Database (1,2,3) - just the Dates so i guess the PM Files or JS or whatever are generating them.
We just do a simple MySql "INSERT" Statement in our Service. Containing every ID, Text and Dates the Table Article is asking for.
We just do a simple MySql "INSERT" Statement in our Service. Containing every ID, Text and Dates the Table Article is asking for.
-
- Znuny newbie
- Posts: 28
- Joined: 22 May 2015, 08:32
- Znuny Version: 5.0.25
- Real Name: David Stockinger
Re: TicketZoom - Article order by create Date
I guess i found the Problem but have to Test it - in UI the DateTime of "creation" per article is shown with time. In the DB create_time and change_time
is only a Date but with Time "00:00:00". So that would change the order of articles in TicketZoom. I will change the times and will see if that helps.
Maybe our service is just inserting the Date so it takes standard time ZERO.
is only a Date but with Time "00:00:00". So that would change the order of articles in TicketZoom. I will change the times and will see if that helps.
Maybe our service is just inserting the Date so it takes standard time ZERO.
-
- Znuny newbie
- Posts: 28
- Joined: 22 May 2015, 08:32
- Znuny Version: 5.0.25
- Real Name: David Stockinger
Re: TicketZoom - Article order by create Date
That was the SOLUTION but still confusing. The DateTime shown in TicketZoom is the field "incoming_time" in the table "Article" but the Articles are sorted by "create_time" or "change_time". Why would you show time by an integer field filled with datetime in ticks but sort it by another field?
So - thread can be closed for me!
So - thread can be closed for me!