leif81 / bzkanban

:bug: A kanban board for the Bugzilla issue tracker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught TypeError - Bug Status name with whitespace

mrenvoize opened this issue · comments

I'm afraid I'm receiving the following error in the console and the kanban board it's loading any cards. I'm not sure how to debug further.

Uncaught TypeError: Cannot read property 'appendChild' of null
    at bzkanban.js:401
    at Array.forEach (<anonymous>)
    at bzkanban.js:399
    at XMLHttpRequest.xhr.onreadystatechange (bzkanban.js:931)
(anonymous) @ bzkanban.js:401
(anonymous) @ bzkanban.js:399
xhr.onreadystatechange @ bzkanban.js:931

Hi @leif81,

So a colleague of mine in the OSS project I'm testing out with this narrowed the problem down a bit.

We discovered that it was due to having whitespace characters within our Bugzilla Statuses.. he's implemented a workaround for now which adds _ characters in place of spaces . It's a little bit of a hack for now so we've not yet submitted it upstream to you.

Koha kanban is our public test instance. It somewhat highlights our need to cleanup our bugzilla status's.. which has been on my list for a while.. though the one's with spaces are likely to stay Passed QA for example is key to our workflows.

I'm afraid I can't replicate the issue on your own live site because we have CORS restrictions in place on our Bugzilla instance (after some issues with bots)

Many thanks for your efforts on this project, I can see it becoming really helpful to the Koha project.

Ah yes, white spaces in status names could very well cause this. Using under scores is a good work around.

@mrenvoize I thought this one rung a bell, we have a similar report here #53

@mrenvoize are the underscores an Ok workaround for you? if so suggest we close the issue, otherwise are you interested in submitting a PR?

Thanks leif81. My colleague has found a workaround that adds underscores then strips them again for display.. looks like he's not pushed it up to github as yet.. and we're not especially experienced JS coders.. but I'll ask him to submit a pull request.