When the task is created, a subtask creates automatically. When I look at the subtask immediately afterwards, the table grids that belong to the subtask do not appear.
The only way to get the table grids to appear on the subtask is to hit the "Edit" button, save, and then the table grids will appear.
Is there any way to force the table grids to appear after a subtask creation?
The value of the custom field is not updated when you create subtasks automatically. The Table Grid custom field value is 'null', and Jira hides all custom fields on the issue view when they are empty.
When you create issues with the Table Grid manually, we insert the number of rows as the custom field value to make the grid displaying. It's omitted when you create the issue automatically.
What you see on the issue view is not what is saved in the CustomField object. When you edit an issue, you update the value and our script works in this case. But it does not work when the issue is created automatically.
You need to add some value to the custom field. Meaning the values that the Java object CustomField holds.
For example, the number of rows in the grid, like when you manually create an issue with TGE. You can add it to your post-function script.
If you are using Script Runner for subtasks creation, you can add a script that will update the custom field's value on the create issue.