
Hello Ur, because those are »options« and not »positional arguments«. This allows to specify multiple TicketIDs and TicketNumbers on the same commandline. Martin Gruner Team Lead R&D OTRS AG Bahnhofplatz 1a 94315 Straubing T: +49 (0)6172 681988 0 F: +49 (0)9421 56818 18 I: www.otrs.com/ Geschäftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751, USt-Nr.: DE256610065 Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: André Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel Mobile Kommunikation und transparente Prozesse - Mit der OTRS Business Solution™ Managed 5 schnell und ohne eigene IT-Ressourcen starten - Jetzt neue Features entdecken und bestellen https://www.otrs.com/neu-in-otrs-business-solution-5-mobile-kommunikation-tr...
Am 23.03.2016 um 12:57 schrieb Úr Balázs
: Hi,
There is a command line tool in OTRS 4 for deleting tickets:
otrs.TicketDelete.pl - delete tickets by number. Copyright (C) 2001-2016 OTRS AG, http://otrs.com/
Usage: otrs.TicketDelete.pl [options]
Options are as follows: --help display this option help --TicketNumber no1 no2 no3 delete listed tickets (by ticket number) --TicketID no1 no2 no3 delete listed tickets (by ticket id)
$ perl otrs.TicketDelete.pl --TicketNumber 2015120616000016 2016020116000015 Deleting specified tickets... 2 tickets have been deleted.
In OTRS 5 there is also a command line tool to delete tickets:
perl otrs.Console.pl Maint::Ticket::Delete --help
Delete one or more tickets.
Usage: otrs.Console.pl Maint::Ticket::Delete [--ticket-number ...(+)] [--ticket-id ...(+)]
Options: [--ticket-number ...(+)] - Specify one or more ticket numbers of tickets to be deleted. [--ticket-id ...(+)] - Specify one or more ticket ids of tickets to be deleted. [--help] - Display help for this command. [--no-ansi] - Do not perform ANSI terminal output coloring. [--quiet] - Suppress informative output, only retain error messages.
This is not work: perl otrs.Console.pl Maint::Ticket::Delete --ticket-number 2016032344000018 2016022644000041 Error: found unknown arguments on the command line ('2016022644000041').
But this works: perl otrs.Console.pl Maint::Ticket::Delete --ticket-number 2016032344000018 --ticket-number 2016022644000041 Deleting tickets... 8 5 2 tickets have been deleted.
Why is it neccessary to set --ticket-number several times? Why doesn't work with a list of ticket numbers separated by space or something other separator?
Regards, Balázs --------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs