When you build a plug-in and run it on jira, you can see the following errors in the browser’s developer tool.
Uncaught TypeError: Cannot read properties of undefined (reading ‘setTableSortable’)
Thank you for your interest.
Is there anything I need to add to the web resource? I thought it was already included inside the jira.
My web resources are as follows.
Hi @hyojoonchoi, this looks OK and should work.
You don’t need anything else.
How do you require your approval context or approval-resources web-resource key?
I think you should try to put your JS code in the regular JS file and add it to the web-resource as <resource type="download" ...
then, replace the inline script with the $webResourceManager.requireResourcesForContext("approval");
a side note: you should rename your context name to sth more unique as those names are global and you risk the clash with some other app
But it still doesn’t work
So when I changed the context of web-resource to jira.general, the function worked.
I understand that custom context is recommended because of the risk of collision. Is there anything I did wrong?
Is there something wrong with writing $webResourceManager.requireResourcesForContext (“approval”)?