Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA.Forms is undefined Edited

We're trying to add a menu option to create a linked issue, but always in the same project. I'm using a Constrained create issue dialog fragment from Adaptavist ScriptRunner, and it works flawlessly in a test instance. In production, however, the dialog does not show unless another dialog was opened before. For example, the create button has to be used before. The JavaScript console shows the following error:

TypeError: JIRA.Forms is undefined

Chrome gives the following error:

Uncaught TypeError: Cannot read property 'createCreateIssueForm' of undefined    at HTMLAnchorElement.<anonymous> (batch.js?healthcheck-resources=true&is-server-instance=true&is-system-admin=true&jira-nps-enabled=true&jira.create.linked.issue=true&locale=en-US&nps-acknowledged=true&nps-not-opted-out=true&richediton=true&sd_operational=true&user-logged-in=true&whisper-enabled=true:32673)    at HTMLAnchorElement.dispatch (batch.js:104)    at HTMLAnchorElement.h (batch.js:96)

We've tried to deactivate all plugins, but the problem persists. Does someone know this problem?

 

Edit: The problem persists with vanilla Jira. Trying to run the following code triggers the error:

var createCreateIssueForm = require('quick-edit/form/factory/create-issue');
      createCreateIssueForm()
        .asDialog({windowTitle: 'Create Issue'})
        .show();

Edit: I have narrowed down the problem to the file "com.atlassian.jira.jira-quick-edit-plugin:quick-form.js" which is not loaded from the server initially. I could work around the issue with the following Scriptrunner web panel code:

 


import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.plugin.webresource.WebResourceManager
import com.atlassian.plugin.webresource.UrlMode 

def wrm = ComponentAccessor.getWebResourceManager()
wrm.requireResource("com.atlassian.jira.jira-quick-edit-plugin:quick-form") 
def resourceString = wrm.getStaticPluginResource("com.atlassian.jira.jira-quick-edit-plugin:quick-form", "com.atlassian.jira.jira-quick-edit-plugin:quick-form.js", UrlMode.ABSOLUTE).replace("resources", "batch") 
writer.write("<script>AJS.\$.get(\""+resourceString+"\");</script>")

 

2 answers

Not really. We implemented the workaround described above. We don't work with this customer anymore, so I don't know if they still use it or not. The ticket can therefore be closed.

@Roman Maire 
have you created a web item in the web panel created by you?

i have the same problem but Script fragment - "Constrained create issue dialog" post on system.top.navigation.bar. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

102 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you