Debugged wrong URI parameter in decodeURIComponent. missing "/jira/" ? #49

Open
webkenny opened this Issue Mar 9, 2014 · 2 comments

Projects

None yet

2 participants

@webkenny

So to make sure I didn't waste your time, I pored over the codebase to see if I could find where it should show the /jira prefix to the uri but nowhere do I find a mention of the word "jira" outside the comments and I don't see any mention in the example or documentation for passing it in. This could be some piece of data assumed from some other practice (config.json perhaps?) but I believe it needs to be referenced in the docs or this simply doesn't work.

http://kenny:kenny@localhost:2990/rest/api/2/issue/TEST-1

As an example of what my debug session returns on line 160 of jira.js when I follow the example in the README to the tee. (Note that is a correct URL except it is missing the /jira/ before the rest portion)

It's very possible I am missing something and if so, I apologize for wasting your time but this has me utterly confused. :)

@StubbsPKS

We actually have the same problem. Some method of identifying the context to use would be great, as we also use 'jira' as a context in our implementation.

As a temporary workaround, I've changed the definition of basePath on line 146 of jira.js to read:
var basePath = 'jira/rest/api/';

This has solved our issue, but obviously your mileage may vary.

@webkenny

Great. Well now that I know this is a common issue, I'll go ahead and fork this bad boy and create a pull request with that change. Thanks for the suggestion! I'll do the following:

  • Add a context setting
  • If null, we'll leave it out.
  • If not, we'll use it.

Fork coming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment