I code in Python, not in PHP. We use OsTicket in our small organisation. We need to update tickets in bulk, we very often also need to create (similar type of) tasks for multiple tickets at once. Since OsTicket v 1.14 does not yet provide full REST API, I am planning to write python scripts to add/edit field values (for closing tickets, posting comments, assigning to teams, updating form fields, creating tasks etc) directly in the MySQL database. Ours is a small team and we can assure nobody else is editing the fields through the frontend while the python scripts are doing the same in the backend, may be by scheduling such scripts to run at midnight. Other than this, does this approach have any bad side effects like not updating the database views automatically, etc ?

Thank you. I needed a small affirmative go ahead from the core developers or the experienced before I put my time on this task.

@PPK

You should be fine, all changes in the DB will reflect in the UI (if done properly and all related tables are updated as well). I suggest that you also add an event to the thread when you update things on a ticket (for things that usually add events such as assignments, field edits, transfers, status changes, etc.) so you can see down the road what set these values (trust me, way better for auditing, viewing the history, etc.). Look at the thread_event table for examples.

Cheers.

Write a Reply...