How to connect the grid to a database
Connecting the grid to an external database is the next logical step in setting up the environment, as it will allow you to persist the data.
As an example, we will store our family list in an external mysql database, running on the local machine. (postgress, oracle works equally well).
You are a bit on your own for setting up your database, but there is plenty of detail available on the internet on how to do this..
First setup a datasource specification and add a specification 'erp' detailing all connection properties to connect to the erp database.
Modify the grid specifications of the Family List custom field by adding in the default value following configuration.
gd.tablename=familylist
gd.ds = erp
Â
Save the default value, edit an issue and add a row.
Check your database. If all went well, you should now have a new table in your database which will be used to store the grid data.
Note that the table name is familylist_c10010
familylist is the name you provided in the configuration
c10120 is the string identifier of the context of the custom field.
The reason why the grid is using this tablename is to avoid any naming conflicts.
This way you can create grid configurations without risking overwriting existing
tables.
Start to enter data in one or more issues, and watch how your data is persisted
in the table.
Note that the data is persisted in the database only when the issue is created
and/or updated.