Closed mbystrzak closed 1 year ago
Hi @mbystrzak, do you have any log in the terminal? Here is a guide to look at the logs here
I do, but I'm hesitant to post it because it has proprietary information in it. I grabbed the snippets that I felt were important in an effort to obfuscate the sensitive stuff. Is there specific things I might look for?
Yes, sure you must delete all sensitive data. Is there any error message?
yes, I noted it in my original post...
{"statusCode":400,"body":{"errorMessages":[],"errors":{"reporter":"Reporter is required."}}
That's the only error message.
The fastest way to understand the problem is hack the plugin code.
In this folder you have all installed extensions
~/.vscode/extensions
If you open with text editor this file
~/.vscode/extensions/gioboa.jira-plugin-xx.xx.xx/out/src/services/issue-helper.service.ts
You can debug the code with console.log because are visibile in VsCode dev tool - Help > Toggle Developer Tools
you can log the payload
at this line and check it
in this method the plugin is going to create the issue
@gioboa Excellent! Thanks for this. I will give this a go and see what I can do. I'll report back in the near future.
OK. So I'm finding that I must have a different version of this plugin than what you're referencing. My issue-helper.service file only has 329 lines and the line you mentioned doesn't exist. The line I have looks like this...
const createdIssue = yield _1.store.state.jira.createIssue(payload);
Can you tell me where you are defining the reporter and pushing it into this method?
Check this line https://github.com/gioboa/jira-plugin/blob/05db0960eee536f45f855c126930e0d63a7c0cb2/src/services/issue-helper.service.ts#LL170C7-L170C95
if (this.isAssigneeOrReporterField(fieldName)) {
// assignee autoCompleteUrl sometimes don't work, I use custom one
// this.preloadedListValues[fieldName] = await store.state.jira.customRequest('GET', field.autoCompleteUrl);
this.preloadedListValues[fieldName] = await store.state.jira.getAssignees(this.project);
}
type JIRA_PLUGIN_DEBUG_MODE
In your current text editor and you will enable the debugMode to log extra info
https://github.com/gioboa/jira-plugin/blob/05db0960eee536f45f855c126930e0d63a7c0cb2/src/services/logger.service.ts#LL22C25-L22C47
I didn't remember this piece of code 🤣
private debugMode() {
const editor = vscode.window.activeTextEditor;
if (editor && editor.document) {
const text = editor.document.getText();
if (text.indexOf('JIRA_PLUGIN_DEBUG_MODE') !== -1) {
return true;
}
}
return false;
}
we need to pass the id of the reporter. this is a screen from a Jira Web Application HTTP request
I created a Jira Test account because I don't use it anymore 🤣
if you clone the repo, install deps. then you could press F5 From VsCode (first instance) --> another instance of VsCode will be launched.(second instance). You can debug the second instance by the first one, breakpoint are available.
@mbystrzak can you apply this fix in your extension code? let me know if it works.
Here I created the version 022.3-beta.0, let me know if it solves the issue jira-plugin-0.22.3-beta.0.vsix.zip
Sorry for the delay. Things got away from me. This worked. I'd recommend pushing this into your production code so we can pull it from the store.
Great 😃 I will create the new release soon. Please star ⭐ the repo, it means a lot to me 😉
Hello,
This may be more of a question so I apologize in advance but I'm hitting a wall and looking for some guidance. I'm experiencing this error "Reporter is required" when I am attempting to create a new issue through this extension. I can do all other things with the extension, just not the issue creation.
I am inputting a "reporter" in through the command bar and it's allowing me to submit the request. It is replying with this http 400 error as I noted above. I've tried a bunch of things but I cannot figure out how to set this attribute in the vscode settings as there doesn't appear to be an attribute for it. I can see in the request that my accountid in a custom header, x-aaccountid.
Can you help guide me on how I might solve this issue?