You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
We're testing an upgrade to v9.4 from v8.19, and the custom scripts we have for ScriptRunner scripted fields are no longer rendering on the issue view page.
Our scripts output AJS code to update, for example, the ghx-issues-in-epic-table
In the upgraded JIRA product, when viewing an issue the developer tools are showing the error: "TypeError: AJS.$ is not a function", and the table and field are not displaying as expected.
I have read over the changes in Preparing for JIRA 9.0 documentation but it's not clear to me how this applies to our usage within the ScriptRunner Scripted Fields.
Any help or experience with the same challenges would be much appreciated.
Thanks for the help, we found the solution we were looking for.
Starting with the details on this Preparing for JIRA 9.0 page, and the details outlined here, we tracked down how to add the resourcePhaseCheckpoint.defer option in our script and this has resolved the issue.
It might be helpful to consult this page: https://bitbucket.org/atlassian/platform-module-usage/wiki/aui.md
And review the AUI dependency change associated with your jira upgrade, then review the AUI changelog. E.g. https://aui.atlassian.com/aui/latest/docs/upgrades/aui-9.html#9.2-to-9.3
Also, from your old and new versions of jira, you can run "AJS.version" in your developer panel to get the specific AUI version used in each.
For example, I'm on Jira 8.20.26 and AUI version is 9.2.3-4dc984d9f
That being said, I don't think there are any changes that would cause AJS.$ to error out.
I'm early in my 9.x exploration (waiting for 9.5 LTS), and I've not encountered this (and I do use some AJS.$ functions). So perhaps a more specific/detailed example would help.
It may also be worth reaching out to the support team at Adaptavist, the ScriptRunner vendor