Clear test data from Compiere

For those who got the Open Source fever, sharing only makes you hot!

Moderator: neilg

Clear test data from Compiere

Postby andrey » Sun Jan 30, 2005 4:52 pm

I want to share a code that has proved very useful for us. When one begin to fiddle with Compiere and enter sample test data, he or she may often find in position when things go messy and start over is needed. But in Compiere it is not easy to delete data: especially transactions and accounting data.

So here I present you with the current version of our ClearData process, that erases all the transactional data (orders, financial and material storage data) from Compiere's current client, and let you start over. You do not lose any static data - like business partners, products, etc. With this process you can easily start over testing. But it is highly recommended not to use this process on production environment!

Here you are:
:arrow: http://alpha.bulgarpress.com/ClearData.rar

Some installation hints: inside the archive you'll find 2 java classes. To run it you'll probably need to change their package names (we use custom build schema, as we have a lot of addons which we keep outside compiere source). The easiest way is to put them into Compiere's "base" project. Then you shall rebuild Compiere. After that start up compiere, log-in as System and add (from "Report & Process") a new process using ClearData class. Then add a Menu item and restart the Compiere client.

Use it at your own risk! I do not guarantee that it will always work, as we have come to it in an empiric way, and from time to time we use to add some more tables for deletion. Nevertheless it works for us. Hope some of you may find it useful.

Regards,
Andrey.
andrey
 
Posts: 4
Joined: Wed Jan 05, 2005 11:59 pm
Location: Sofia, Bulgaria

Postby red1 » Sun Jan 30, 2005 10:38 pm

Hi Andrey,
This sounds really useful. I m sure many will enjoy what u contributed. On behalf of them, I heartily thank you. 8)

many regards,
red1
red1
Site Admin
 
Posts: 2415
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Where to download the file ?

Postby eric100 » Sat Oct 14, 2006 11:06 am

Hi,
The URL to download this file "ClearData.rar" is no longer available.
I really need this file as i want to reset test data from compiere and i find it difficult to do manually.
Could anyone give the updted URL for downloading it ?

Thanks
eric100
 
Posts: 9
Joined: Tue Aug 15, 2006 11:55 pm

Postby andrey » Sun Oct 15, 2006 2:27 am

Hi!

it's been long time since I worked on compiere, meanwhile we have changed our company site... Now ClearData source (which was developed at the time of Compiere 251.x) is available for download from this location. I haven't tried it on newer distributions... and it needs some integration with Compiere to get it to work. But it hope that this source will be useful.

Regards,
Andrey.
andrey
 
Posts: 4
Joined: Wed Jan 05, 2005 11:59 pm
Location: Sofia, Bulgaria

Delete transaction data

Postby eric100 » Sun Oct 15, 2006 4:11 am

Hi, the code and the idea behind are very good, i have just tried it on 253b but in vain.
I have to dig more..
what am trying to do is to delete test data and migrate customization from an instance to an other.

Anyway thanks a lot for your reply.
eric100
 
Posts: 9
Joined: Tue Aug 15, 2006 11:55 pm

Postby andrey » Wed Oct 18, 2006 8:17 pm

My code is very simple and just removes the data from some of the tables of Compiere. It does not cope with migration at all. A fellow member (Trifon) of this forum has some solution for migration of some of the customization data - but you'll have to look at it to see if it works for you.
andrey
 
Posts: 4
Joined: Wed Jan 05, 2005 11:59 pm
Location: Sofia, Bulgaria

Removing testing data

Postby eric100 » Thu Oct 19, 2006 4:45 am

I have found a similar sql scrpit of what you have given wrote by pshen but it has to be adapted for 253b as the database has evolved.
I tested th 2 pack solution without any problem for creationg packages and exporting them (packOut), but the problem is in importing (packIn).
there ares some issues.
now am examinating the trifon solution and testing it.
I tried with taod but...
with the import and restoredb scripts given by compiere some customised windows have some fields that do not recognize their colum db fields even if the exists in database and compiere tables
i think i will finish by trying to create an sql scrip or an xml tool for that if i can

Thanks
eric100
 
Posts: 9
Joined: Tue Aug 15, 2006 11:55 pm


Return to Contributor's Corner

Who is online

Users browsing this forum: No registered users and 1 guest

cron