Can Not Be Used On JIRA Plugins

Can Not Be Used On JIRA Plugins

machinecodemachinecode Posts: 4Questions: 0Answers: 0
edited October 2013 in Bug reports
I'm trying to use on a jira plugin project. But I can not initialize datatables.

http://debug.datatables.net/ocexad

error: TypeError: Cannot read property 'length' of undefined

Replies

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    Sorry - we need a link to a test case for this one. The debug trace doesn't show what is going wrong.

    Allan
  • machinecodemachinecode Posts: 4Questions: 0Answers: 0
    Actually, it's too hard. Because I'm using atlassian sdk.

    If you can download this https://marketplace.atlassian.com/plugins/atlassian-plugin-sdk-windows and try with a default servlet and default table you can see.

    Another alternative, I don't know there is a way to try this. You can use https://docs.atlassian.com/aui/latest/sandbox/# and select tables from library :(
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    So I went to the sandbox and clicked Tables, but I'm not to sure how to actually run DataTables on the code. I tried adding a tag int he HTML, but it didn't like that, and it didn't like DataTables being pasted directly into the Javascript part. Is that what you are running in it?

    Looking at the table it should work just find in DataTables - I'm not sure what JIRA is doing that would be breaking jQuery plug-ins. Have you managed to run other jQuery plug-ins?

    Allan
  • machinecodemachinecode Posts: 4Questions: 0Answers: 0
    edited October 2013
    Now, i can reproduce error on sandbox.

    I gave an id on html section to table, added datatable code to javascript section than write jQuery('#table').dataTable(); command to javascript section. After all when I ran js on console side it gives an type error message: "Cannot read property 'length' of undefined"

    Also after adding datatables to js section. You can call jQuery('#table').dataTable(); command from console with selecting output-frame.

    Yes I used autocomplete plugin before.
  • machinecodemachinecode Posts: 4Questions: 0Answers: 0
    Have you any idea?
  • akimaakima Posts: 2Questions: 0Answers: 0
    Having the same issue. Any progress/ideas?
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    Are you able to link me directly to your JIRA showing this problem? I wasn't able to gain access to one before, and I haven't had a chance to install JIRA myself.

    Allan
  • akimaakima Posts: 2Questions: 0Answers: 0
    Allan, I've got a local copy of JIRA provided by Atlassian SDK. If you could download it I would provide a code sample for plugin with DataTables plugin connected to the code.
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    I'm afraid I've already not got enough time to do everything that needs to be done in a day. I'll try to do this when I create a bit of time in the next few weeks, but that's the best I can really say at the moment without a link to a test case. Sorry.

    Allan
  • ashiersashiers Posts: 101Questions: 8Answers: 7
    As an aside, I noticed you brought up the fact that you're on the Java platform with your reference to a "servlet". I'm wondering if you were aware of a library of classes that support DataTables on the server side known as JED. Check it out and see of if is something that might benefit you.
    http://jed-datatables.ca/jed/
This discussion has been closed.