插件在 VS Code 上无法正常工作

发布于 2025-01-19 06:11:40 字数 111 浏览 3 评论 0原文

我曾经使用VS代码和JIRA的Atlassian插件。自几个月以来,它的运作良好。

现在,我无法创建一个新问题,既没有打开现有(分配的)问题,也无法从那里创建分支。

我该如何解决?

I use to work with VS Code and the Atlassian plugin for Jira. It have been working quite well since few months on.

Right now I'm not able to create a new issue, neither open an existing (assignated) issue, and create a branch from there.

How can I solve it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

罪#恶を代价 2025-01-26 06:11:40

我认为您遇到的问题可能是由于 Atlascode 插件使用的底层库中的错误所致。

我遇到了同样的问题,并找到了修复的参考(我再也找不到了)。

该错误看起来像是在联系 Jira Data Center 实例时尝试使用对 Jira Cloud 有效的 REST API。基本上,它不是调用 issue/createmeta/{projectIdOrKey}/issuetypes 而是调用 issue/createmeta/{projectKey}?expand=projects.issuetypes.fields - 因为它无效导致 404 和 VSCode 中的 Jira 问题屏幕无法加载。

解决此问题的方法是修改 .vscode 目录中与 Atlascode 插件关联的 extension.js 文件。

如果您修改所有出现的情况:

从: this.getFromJira("issue/createmeta",{projectKeys:[t],expand:"projects.issuetypes.fields"})

到: this. getFromJira("issue/createmeta/".concat(t,"/issuetypes"))

但是,只要有新版本的 Atlascode 发布,您就需要执行此操作已发布。

我已将其作为 bug 提出Atlascode - 希望有人能适当解决这个问题。


仅供参考 - 这是一个 sed 行,它将为您修复 extension.js 文件:

s/"issue\/createmeta",{projectKeys:\[t\],expand:"projects .issuetypes.fields"}/"issue\/createmeta\/".concat(t,"\/issuetypes")/g

I think what you might be experiencing is due to a bug in an underlying library which the Atlascode plugin is using.

I was experiencing the same issue and found a reference to a fix (which I can no longer find).

The bug looks like it is attempting to use a REST API valid for Jira Cloud when contacting Jira Data Center instances. Basically instead of calling issue/createmeta/{projectIdOrKey}/issuetypes it's calling issue/createmeta/{projectKey}?expand=projects.issuetypes.fields - which as it's not valid results in a 404 and the Jira issue screen in VSCode not loading.

The fix for this is to modify the extension.js file associated with the Atlascode plugin in your .vscode directory.

If you modify all occurrences:

From : this.getFromJira("issue/createmeta",{projectKeys:[t],expand:"projects.issuetypes.fields"})

To : this.getFromJira("issue/createmeta/".concat(t,"/issuetypes"))

However you will need to do this whenever a new version of Atlascode is released.

I have raised this as a bug against Atlascode - hopefully someone will address this appropriately.


FYI - here is a sed line which will fix the extension.js file for you:

s/"issue\/createmeta",{projectKeys:\[t\],expand:"projects.issuetypes.fields"}/"issue\/createmeta\/".concat(t,"\/issuetypes")/g

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文