Giter VIP home page Giter VIP logo

osticket-plugin-archiver's People

Contributors

bradleygreen avatar chetan-prime avatar clonemeagain avatar cornernote avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

osticket-plugin-archiver's Issues

Compatible with 1.17.2?

Today I installed the update to 1.17.2, since then a database error appears in the log file with every cron job. When I switch off the archiver, the error disappears.

I put "Signal::send('ticket.before.delete', $this)..." in Class.Ticket and also tried this: #22

I also pressed the save button in the plugin window, no error message

This is the error in log file:
[INSERT INTO ost_config SET key = 'last-run', value = 1668676461, updated = NOW()] Duplicate entry 'last-run' for key 'namespace'

---- Ablaufverfolgung ----
#0 (root)/include/mysqli.php(207): osTicket->logDBError('DB Error #1062', '[INSERT INTO o...')<br /> #1 (root)/include/class.orm.php(3482): db_query('INSERT INTO os...', true, true)
#2 (root)/include/class.orm.php(658): MySqlExecutor->execute()
#3 (root)/include/class.config.php(181): VerySimpleModel->save(true)
#4 (root)/include/class.config.php(114): ConfigItem->save()
#5 (root)/include/class.config.php(124): Config->create('last-run', 1668676461)
#6 (root)/include/class.config.php(89): Config->update('last-run', 1668676461)
#7 (root)/include/plugins/osticket-plugin-archiver-master/class.ArchiverPlugin.php(79): Config->set('last-run', 1668676461)
#8 (root)/include/plugins/osticket-plugin-archiver-master/class.ArchiverPlugin.php(54): ArchiverPlugin->autoPurge()
#9 (root)/include/class.signal.php(98): ArchiverPlugin->{closure}(NULL, Array)
#10 (root)/scp/autocron.php(66): Signal::send('cron', NULL, Array)
#11 {main}

Does anyone have any ideas?

is still working?

I am not sure what is the cron function and how to cron it. The only auto cron I know in osticket is the cron for fetching the emails on page load.

Can you explain me please?

Plugin not working

I have installed plugin. Also enabled it. But it's not working.

I read cron setup is required.But in osticket emails getting fetched properly without cron. How to get this working ?

Error after installing plugin

I upgraded to 1,11
I added a row with 'Signal::send('ticket.before.delete', $this); // Archiver plugin: Added to archive tickets before deleting them. to the 'class.ticket.php' file.
After this change, i cannot open an existing attachment. I get a windows error that the file is corrupt.
After restoring the original file it works again.

Seems that I did something wrong?

I had the folowing:

function delete($comments='') {
global $ost, $thisstaff;

Signal::send('ticket.before.delete', $this); // Archiver plugin: Added to archive tickets before deleting them.

//delete just orphaned ticket thread & associated attachments.
// Fetch thread prior to removing ticket entry
$t = $this->getThread();

time of purge

Hello and thank you for the plugin.
I was wondering how I might accomplish a purge
either manually or at midnight on the same date
each month.

Change status to Archived without changing the Closure Date value

Version: osTicket v1.16.2

Hi everyne,

I don't know if it is the right place to post this, but I am new here and I don't know where to post it.

I would like to know if there is a way for me to update this plugin so when the status changes to Archived the Closure Date value doesn't get updated?

I would like to use your plugin to avoid old closed ticket to be reopened. I would like to flag them to "No Reopen" or to change their status to Archived.
The problem is that when the plugin changes the tickets status to Archived, the Closure Date value is updated too.
I need to keep the Closure Date unchanged, because we use it for our statistics.
This "wrong" Closure Date will affect the statistics on our dashboard in which we display the number of closed ticket per month, the rate of SLA respect etc...

Thank you in advance for your answers.
Regards,
Angel

All data is not cleaned up

osTicket 1.12.2

I have found that after the archiver runs via cron, there are still lots of orphaned records left behind. Most of those can be deleted like this:

DELETE FROM dbprefix.soft_threadWHEREobject_type= 'T' ANDobject_idNOT IN (SELECTticket_idFROMsoft_ticket);
DELETE FROM dbprefix.soft_thread_entryWHEREthread_id NOT IN (SELECT id FROM soft_thread);
DELETE FROM dbprefix.soft_thread_entry_emailWHEREthread_entry_id NOT IN (SELECT id FROM soft_thread_entry);

I have also determined that soft_thread_event also seems to be an ever growing table, and I have not yet addressed it with cleanup queries.

The reason why this is an issue for me is that I am hosting on a SiteGround shared account, and all databases are limited to 1GB, so we cannot have an ever-growing database, it needs to be kept pruned.

Thoughts?

osTicket 1.15

Hi!
Can you provide a current version of your plugin working with osTicket v1.15 ?

This would be much appreciated!

Best regards,
Lukas

Version 1.14.1

We were able to install the latest plugin in our version, however, we continue to get error when setting the archive location.

I have all permissions setup as needed... it still doesn't seem to be able to write to the Archive folder

gives error

Check the permissions of the path /home/admin/web/Archive, admin can't write to it. The signal is not being sent from class.tickets.php, check README.

Any suggestions?

Polish Readme

The text needs work, as does the installation instructions.. christ..

Download zip, unzip into server, (into /include/plugins/archiver folder)
Visit admin panel, "manage => Plugins", "Add new Plugin", "Select Archiver", Click box next to Archiver, select More => "Enable", then 'Yes'.. FFFS, that's quite a few steps.

Then go into the config for the plugin, and configure how to archive, and where to archive, also whether to use cron and whether or not to dump private notes inside the PDF.

Importer

If using the Advanced Mode archiver, it should be possible to pull back the meta.json & attachments to rebuild the ticket..

christ what a task though.

Is there a way to Manually run this plug-in?

Hello,

Trying to use this plugin to remove a back log of 80,000 closed tickets on Osticket version. V1.15.8

It appears after it was enabled to run each hour that it cleared 5000 tickets and has seemed to of stopped. Is there a way to manually queue the deletion of lets say 20,000 tickets using this plugin? Or does it have to be completed through the cron?

The Cron Job was configured using Ostickets documentation.

Advanced Export fail

If you've tried this, you'll find that the archive function doesn't work, but everything else is peachy.

Considering that's sorta the whole point, it's a bit critical, hence the "Not ready" for use statement.

  • Figure out why the PDF export is blank, I think it's debugging statements.. almost there.
  • Gather all info for Advanced export, still missing stuff.
  • Figure out attachments in Advanced export

osTicket 1.16

Two little modification required to get it work.

In class.ArchiverPlugin.php
You have to add '&$errors' argument to the function, like this:

function uninstall(&$errors) {
		//$errors = array ();
		
		// Do we send an email to the admin telling him about the space used by the archive?
		global $ost;
		$ost->alertAdmin ( 'Plugin: Archiver has been uninstalled', 'Please note, the archive directory has not been deleted, however the configuration for the plugin has been.', true );
		
		parent::uninstall ( $errors );
	}

In config.php
You only have to reference to $config (with &)

function pre_save(&$config, &$errors) {
		
		// Delete mode doesn't actually need any of this:

That's it, now it should work :)

PHP Parse error for folder path in Advanced mode

Error message:

[Sun Jun 20 06:52:00.213229 2021] [php7:error] [pid 35] [client 1.2.3.4:46738] PHP Parse error:  syntax error, unexpected '.' in /var/www/src/include/plugins/archiver/class.ArchiverPlugin.php on line 205, referer: https://example.com

Workaround:

$folder = $path . '/' . @Format::slugify ($dept) . '/' . @Format::slugify ($user) . '/' . @Format::slugify ("{$ticket->getSubject ()}_{$ticket->getNumber ()}");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.