How to delete changes & change Change count
Moderator: crythias
-
- Znuny newbie
- Posts: 28
- Joined: 18 Sep 2012, 10:05
- Znuny Version: 3.1.10
- Real Name: DCO
- Company: EGOV
How to delete changes & change Change count
Hello Team,
Q-1) How we can delete old change records from the system, from generic agent i am able to delete tickets but not changes.
Q-2) How to modify change counter, right now its either using Date or Datesum which both are too long. We need something like Ticket numbers Such as Change # 100020
Thanks,
Ravi
Q-1) How we can delete old change records from the system, from generic agent i am able to delete tickets but not changes.
Q-2) How to modify change counter, right now its either using Date or Datesum which both are too long. We need something like Ticket numbers Such as Change # 100020
Thanks,
Ravi
Re: How to delete changes & change Change count
Q 1) have a look in OTRS bin directory
Q 2) will need development
Q 2) will need development
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny newbie
- Posts: 28
- Joined: 18 Sep 2012, 10:05
- Znuny Version: 3.1.10
- Real Name: DCO
- Company: EGOV
Re: How to delete changes & change Change count
jojo wrote:Q 1) have a look in OTRS bin directory
Q 2) will need development
Hi Thanks for the Reply!
Regarding Q-1) i can find ITSMChangeDelete.pl in the bin directory, but sorry i am new to OTRS. Could you let me know how we can enable the change delete options using this perl scrip?
Regarding Q-2) Could you please Explain in details.
Regards
Re: How to delete changes & change Change count
1) Run the perl script with -help (works with most scripts)
You will notice that this script is limited, so maybe use SQL first to get all the specific changenumbers you want (eg all closed changes from before a certain date)
2) You will need to modify the code. See this for an example for incidents: viewtopic.php?f=61&t=7033 , I'm not sure how Changes are generated.
You will notice that this script is limited, so maybe use SQL first to get all the specific changenumbers you want (eg all closed changes from before a certain date)
2) You will need to modify the code. See this for an example for incidents: viewtopic.php?f=61&t=7033 , I'm not sure how Changes are generated.
-
- Znuny newbie
- Posts: 28
- Joined: 18 Sep 2012, 10:05
- Znuny Version: 3.1.10
- Real Name: DCO
- Company: EGOV
Re: How to delete changes & change Change count
Thanks, I have the list of changes. How do i run perl scrip on windows platform?
Re: How to delete changes & change Change count
the same as you would on Linux:
perl ITSMChangeDelete.pl
if the perl command isn't path'd (if you open up cmd and type 'perl -v' and it can't find the command) you will have to cd to the perl bin directory where the perl executable is, and then run it from there with the full path to the perl script.
perl ITSMChangeDelete.pl
if the perl command isn't path'd (if you open up cmd and type 'perl -v' and it can't find the command) you will have to cd to the perl bin directory where the perl executable is, and then run it from there with the full path to the perl script.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
-
- Znuny newbie
- Posts: 28
- Joined: 18 Sep 2012, 10:05
- Znuny Version: 3.1.10
- Real Name: DCO
- Company: EGOV
Re: How to delete changes & change Change count
Hello,
Thanks for the reply.
My Delete perl executive is under below path.
C:\Program Files\OTRS\OTRS\bin hence i gave below command to delete changes.
C:\Program Files\OTRS\OTRS\bin>otrs.ITSMDeleteChanges.pl -ChangeNumber 20120924000001 but i received error saying "its on recognized as internal or external command operatable program or batch file"
Please advice Thanks!
Thanks for the reply.
My Delete perl executive is under below path.
C:\Program Files\OTRS\OTRS\bin hence i gave below command to delete changes.
C:\Program Files\OTRS\OTRS\bin>otrs.ITSMDeleteChanges.pl -ChangeNumber 20120924000001 but i received error saying "its on recognized as internal or external command operatable program or batch file"
Please advice Thanks!
Re: How to delete changes & change Change count
try
perl otrs.ITSMDeleteChanges.pl -ChangeNumber 20120924000001
perl otrs.ITSMDeleteChanges.pl -ChangeNumber 20120924000001
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny newbie
- Posts: 28
- Joined: 18 Sep 2012, 10:05
- Znuny Version: 3.1.10
- Real Name: DCO
- Company: EGOV
Re: How to delete changes & change Change count
now its saying
can not open perl scrip otrs.ITSMDeleteChanges.pl - no such file or directory
can not open perl scrip otrs.ITSMDeleteChanges.pl - no such file or directory
-
- Znuny newbie
- Posts: 28
- Joined: 18 Sep 2012, 10:05
- Znuny Version: 3.1.10
- Real Name: DCO
- Company: EGOV
Re: How to delete changes & change Change count
and path is 100% correct.
Do i need to install any perl software to execute this perl scrip ?
Do i need to install any perl software to execute this perl scrip ?
-
- Znuny newbie
- Posts: 28
- Joined: 18 Sep 2012, 10:05
- Znuny Version: 3.1.10
- Real Name: DCO
- Company: EGOV
Re: How to delete changes & change Change count
When i try to open otrs.ITSMChangeDelete.pl its gives me below error
otrs.ITSMChangeDelete.pl is not valid win32 application
What is wrong here? can i copy paste the same file from other user?
Thanks
otrs.ITSMChangeDelete.pl is not valid win32 application
What is wrong here? can i copy paste the same file from other user?
Thanks
Re: How to delete changes & change Change count
You need to run the perl.exe file, which is not in the OTRS bin directory. On my windows VM it is located here:
C:\Program Files\OTRS\StrawberryPerl\perl\bin\perl.exe
And the file script you want to run is:
C:\Program Files\OTRS\OTRS\bin\otrs.ITSMDeleteChanges.pl
Along with the command line arguments:
-ChangeNumber 20120924000001
So putting that all together, you need to run:
C:\Program Files\OTRS\StrawberryPerl\perl\bin\perl.exe C:\Program Files\OTRS\OTRS\bin\otrs.ITSMDeleteChanges.pl -ChangeNumber 20120924000001
This is an unwieldy command. You can shorten it by changing directory to where the perl.exe file is, and running from there:
cd C:\Program Files\OTRS\StrawberryPerl\perl\bin\
perl.exe C:\Program Files\OTRS\OTRS\bin>otrs.ITSMDeleteChanges.pl -ChangeNumber 20120924000001
If you add the location of perl.exe to your path (google if you're not sure what this is) then you won't have to always go to the location of the perl.exe file in order to run perl scripts.
C:\Program Files\OTRS\StrawberryPerl\perl\bin\perl.exe
And the file script you want to run is:
C:\Program Files\OTRS\OTRS\bin\otrs.ITSMDeleteChanges.pl
Along with the command line arguments:
-ChangeNumber 20120924000001
So putting that all together, you need to run:
C:\Program Files\OTRS\StrawberryPerl\perl\bin\perl.exe C:\Program Files\OTRS\OTRS\bin\otrs.ITSMDeleteChanges.pl -ChangeNumber 20120924000001
This is an unwieldy command. You can shorten it by changing directory to where the perl.exe file is, and running from there:
cd C:\Program Files\OTRS\StrawberryPerl\perl\bin\
perl.exe C:\Program Files\OTRS\OTRS\bin>otrs.ITSMDeleteChanges.pl -ChangeNumber 20120924000001
If you add the location of perl.exe to your path (google if you're not sure what this is) then you won't have to always go to the location of the perl.exe file in order to run perl scripts.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL