I had a ticket that I wanted to edit. So I went into the database and located the content in the a_body field of the article table. After I made the modification though, the change was not reflected in the dashboard representation of the ticket. Interestingly when I printed the ticket, my database modification was reflected correctly in the printed ticket. I suspected a cached copy but did not find any sign of a cache to clear. I thought it might be a copy in the history but could not locate any copies. I restarted OTRS on the off-chance that that would clear a cached copy (if a cached copy existed).
So I thought I would start from scratch and ask the forum...how do you edit the body of a Ticket via SQL (I thought it would be trivial)?
(NOTE: I use Webmin MySQL visual interface but am happy to get SQL commands to run)
Thanks in advance.
How do you modify a Ticket article body in the database?
Moderator: crythias
-
- Znuny newbie
- Posts: 4
- Joined: 20 Nov 2013, 01:49
- Znuny Version: 3.1.7
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: How do you modify a Ticket article body in the database?
Why do you modify the article body? What do you want to achieve? Generally it's a bad idea to change anything in the database (without using the OTRS API).
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How do you modify a Ticket article body in the database?
There's a section for the html part of the ticket as a BLOB, I think
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 4
- Joined: 20 Nov 2013, 01:49
- Znuny Version: 3.1.7
Re: How do you modify a Ticket article body in the database?
Thanks Crythias. Much appreciated. I'll take a look. I had thought of caches and front-end copies but had not thought the front-end copy might be in the form of a blob. Makes sense.
Thanks Reneeb as well. I know there has been debate about not being able to change a ticket article for audit reasons in previous forum posts but I will put myself firmly in the camp that subscribes to adding a feature in the user interface to allow ticket article changes. All changes are logged so there is no audit risk associated. The feature could be disabled by default so only an administrator could choose to enable it. With the new addition of workflow in OTRS the administrator could even enable it with a workflow that requires changes to be approved by a designated QA person before being accepted.
Thanks Reneeb as well. I know there has been debate about not being able to change a ticket article for audit reasons in previous forum posts but I will put myself firmly in the camp that subscribes to adding a feature in the user interface to allow ticket article changes. All changes are logged so there is no audit risk associated. The feature could be disabled by default so only an administrator could choose to enable it. With the new addition of workflow in OTRS the administrator could even enable it with a workflow that requires changes to be approved by a designated QA person before being accepted.
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How do you modify a Ticket article body in the database?
There are third party packages that allow editing of articles. I don't use them, personally, because It'll confuse me when replying to someone on this forum, and I'd like to not provide answers for other than close-to-stock OTRS and, of course, the few pieces of code that I, personally, have provided.
The BLOB is in the database, just in case I wasn't clear about that.
The BLOB is in the database, just in case I wasn't clear about that.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
-
- Znuny newbie
- Posts: 4
- Joined: 20 Nov 2013, 01:49
- Znuny Version: 3.1.7
Re: How do you modify a Ticket article body in the database?
Much appreciated Crythias 
[SOLVED]

[SOLVED]
-
- Znuny newbie
- Posts: 1
- Joined: 24 Jan 2014, 18:59
- Znuny Version: 2.4.9
- Real Name: Brett Davis
- Company: Dynojet Research
Re: How do you modify a Ticket article body in the database?
Hello,
Well this is the closest I've found to an actual solution to this but still just doesn't seem to quite get me there (and MAN is searching for this ever frustrating with all of the preaching and dead ends!). I also agree that I, as the administrator of my system, should be allowed to decide if it's acceptable practice for me to edit articles in the background, traceable or not. The need doesn't come up too frequently but it does sometimes and when it does, I just need to get it done. I have successfully done it a few times in older versions of OTRS by simply editing the previously mentioned a_body field for the appropriate record in the article table. But somewhere between there and around version 2.4.9, this stopped working (I suspect a caching method to boost performance but regardless...). I understand the merits of policies against modifying data with no traceability/accountability in certain environments but mine is not one of them. In my case, it's more important to have correct/accurate information/procedures documented in the system which can be referred back to later on than it is to have "forensics" and the ability to prove if something was initially incorrectly stated at some point along the way to the solution. I'm building a knowledge base not a system to break up a "he said she said" argument. If someone enters something that is later found to be incorrect (perhaps even caused further problems!), the risk of coming across this same misinformation at a later date and making the same mistakes not realizing that (perhaps) 20+ entries later in that same ticket a note was entered retracting, nullifying, or otherwise contradicting a previous one is the worse of the 2 evils in my book. I'd rather be able to go in and fix the original incorrect statement(s). Another scenario is that perhaps an inappropriate comment was made in a ticket which hasn't been seen by anyone else yet and we need to go in and edit it out before it accidentally gets forwarded to the wrong person (of course no one has EVER done THAT! LOL...). I promise all developers of OTRS that full responsibility for any of the terrible things that may happen to me as a result of my policy will fall solely on me and that no lawyers will be contacted.
Could one of you please elaborate on this BLOB? Specifically where it is and/or how we can update it so it's possible to make the html driving what's displayed in the web interface match the (edited) text in the a_body field of the article table. It would be really nice to have this procedure documented somewhere amidst all of the "YOU CAN'T CHANGE HISTORY..." banter that comes up when you search for how to do this in the newer versions of OTRS. If one of you could please be so kind, that would be outstanding and very much appreciated.
Best regards,
Brett
Well this is the closest I've found to an actual solution to this but still just doesn't seem to quite get me there (and MAN is searching for this ever frustrating with all of the preaching and dead ends!). I also agree that I, as the administrator of my system, should be allowed to decide if it's acceptable practice for me to edit articles in the background, traceable or not. The need doesn't come up too frequently but it does sometimes and when it does, I just need to get it done. I have successfully done it a few times in older versions of OTRS by simply editing the previously mentioned a_body field for the appropriate record in the article table. But somewhere between there and around version 2.4.9, this stopped working (I suspect a caching method to boost performance but regardless...). I understand the merits of policies against modifying data with no traceability/accountability in certain environments but mine is not one of them. In my case, it's more important to have correct/accurate information/procedures documented in the system which can be referred back to later on than it is to have "forensics" and the ability to prove if something was initially incorrectly stated at some point along the way to the solution. I'm building a knowledge base not a system to break up a "he said she said" argument. If someone enters something that is later found to be incorrect (perhaps even caused further problems!), the risk of coming across this same misinformation at a later date and making the same mistakes not realizing that (perhaps) 20+ entries later in that same ticket a note was entered retracting, nullifying, or otherwise contradicting a previous one is the worse of the 2 evils in my book. I'd rather be able to go in and fix the original incorrect statement(s). Another scenario is that perhaps an inappropriate comment was made in a ticket which hasn't been seen by anyone else yet and we need to go in and edit it out before it accidentally gets forwarded to the wrong person (of course no one has EVER done THAT! LOL...). I promise all developers of OTRS that full responsibility for any of the terrible things that may happen to me as a result of my policy will fall solely on me and that no lawyers will be contacted.

Best regards,
Brett
OTRS 2.4.9, MySQL, Win2K8
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: How do you modify a Ticket article body in the database?
tl;dr:
Create your own topic.
Use proper sentence structure. Capitals, proper sentence termination punctuation, and whitespace are helpful to readers of your missives.
Get to the point at the beginning or the end of your missives and clearly state them.
There are third party addons that enable editing of articles. They won't necessarily be pointed herein by me because I have no history with them.
Create your own topic.
Use proper sentence structure. Capitals, proper sentence termination punctuation, and whitespace are helpful to readers of your missives.
Get to the point at the beginning or the end of your missives and clearly state them.
There are third party addons that enable editing of articles. They won't necessarily be pointed herein by me because I have no history with them.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask