The public API is delivered in v1.18.0 or higher of the add-on.
Read Grid Data in Edit Mode, Grid Row Count in Edit Mode and Synchronize Custom Field Values API calls are only available since v1.19.0.
Below please find a set of groovy scripts which use Table Grid Editor Java API to read and manipulate grid data and metadata
Make scripts work
You can easily test the scripts in a Script Runner console. All of them are using some JIRA environment data like issue keys or grid names. So, there are some pre-requisites to make things work:
- You did setup a Table Grid Editor custom field named "TGE_TEST" with a default configuration.
- You have an issue "TEST-1" in a project "TEST" and there is some data in "TGE_TEST" grid in that issue (the presence of data is not mandatory, but it will make example scripts more clear for you).
- You installed the Script Runner
Now you can go to the Script Console of the Script Runner, copy any of the scripts there and check how they work. The scripts will provide some output in the "Result:" section on top of the page. If you want to use another grid or another issue for testing - you will have to change the grid name and/or issue key in the script to the names you need.
The java documentation can be found here.
Table Grid Reader API
To use Table Grid Reader Java API, you need to use an object of com.idalko.jira.plugins.igrid.api.data.TGRGridTableDataManager class. You can get it using the following code in your Groovy script:
TGRGridTableDataManager has the following methods: