Mylyn Trac 连接器不显示“严重性”查询编辑器中的属性

发布于 2024-12-26 11:38:46 字数 591 浏览 4 评论 0原文

我们最近决定开始在 Trac 项目中使用 Severity 字段。但是,我无法找到一种方法使该字段出现在 Eclipse 的 Mylyn 插件的查询编辑器中 - 无论我尝试什么,该字段都不在那里。

它确实显示在 Web 界面中,如果我在 Mylyn 中打开一个任务,我可以在那里设置严重性(因此在某些时候 Mylyn 确实了解该属性正在被使用),但它并没有出现在查询对话框中。

我已

  • 确保所有任务都有一个严重性集。
  • 重新启动 Eclipse
  • 与存储库同步
  • 多次点击“从存储库更新属性”
  • 重新安装 Mylyn

但没有成功。还有什么可以尝试的?

澄清:这与编辑工单无关。这是关于从存储库中查询票证,使用任务列表中的右键单击->; “新查询...”。

这就是我看到的表单的样子:

在此处输入图像描述

我也希望在某处有一个用于表示严重性的字段。

We recently decided to start using the Severity field in our Trac project. However, I can't figure out a way to make the field appear in the query editor for the Mylyn plugin to Eclipse - whatever I try, the field is not there.

It does show up in the web interface, and if I open a task in Mylyn I can set a severity there (so at some point Mylyn does understand that the attribute is being used) but it doesn't appear in the query dialog.

I have

  • Made sure all tasks have a severity set.
  • Restarted Eclipse
  • Synchronized with the repository
  • Hit "Update attributes from repository" several times
  • Reinstalled Mylyn

without success. What more is there to try?

Clarification: This is not about editing tickets. It's about querying tickets from the repository, using right-click in the task list -> "new query...".

This is what the form I see looks like:

enter image description here

I want a field for the severity in there somewhere too.

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

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

发布评论

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

评论(3

拥抱我好吗 2025-01-02 11:38:46

您必须获取 TracQueryPage.java 的源代码并添加“严重性”列表。

  1. http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.6.2/org.eclipse.mylyn.trac/ui/3.4.2/org/eclipse/ mylyn/internal/trac/ui/wizard/TracQueryPage.java?av=f

  2. 在 Eclipse 中创建一个空插件项目(例如名为 trac-connector-patch)

  3. 在插件文件夹中找到org.eclipse.mylyn.trac.ui_3.6.0.v20110608-1400.jar并将MANIFEST.MF复制到插件项目的 META-INF 文件夹。删除所有以“Name:”和“SHA1-Digest:”开头的行,然后将 Bundle-Symbolic-Name 更改为

    Bundle-SymbolicName: org.eclipse.mylyn.trac.ui-patched;singleton:=true

  4. 复制TracQueryPage.java 的源代码放入源文件夹中

    src\org\eclipse\mylyn\internal\trac\ui\wizard\TracQueryPage.java

  5. 修复项目构建路径:

    • 从 MANIFEST.MF 中删除 org.eclipse.mylyn.internal.trac.ui 和 org.eclipse.mylyn.internal.trac.ui.editor 的导出
    • 使用上下文菜单“PDE 工具 -> 更新类路径”
    • 如果 org.eclipse.swt 内容仍然存在错误,请将 eclipse 插件文件夹中的 swt jar 作为外部 jar 添加到项目构建 bpath(例如 org.eclipse.swt.win32.win32.x86_64_3.7.1.v3738a .jar)
  6. 修改 TracQueryPage

    //添加新的列表搜索字段
    私有列表搜索字段严重性字段;
    ...
    
    protected Control createTicketAttributes(复合控件) {
        复合组 = new Composite(control, SWT.NONE);
        GridLayout 布局 = new GridLayout();
    
        布局.numColumns = 5; // 添加一列
    
        group.setLayout(布局);
        GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
        gd.horizo​​ntalSpan = 1;
        group.setLayoutData(gd);
    
        标签标签=新标签(组,SWT.LEFT);
        label.setText(Messages.TracQueryPage_Status);
    
        标签=新标签(组,SWT.LEFT);
        label.setText(Messages.TracQueryPage_Resolution);
    
        标签=新标签(组,SWT.LEFT);
        label.setText(Messages.TracQueryPage_Type);
    
        标签=新标签(组,SWT.LEFT);
        label.setText(Messages.TracQueryPage_Priority);
    
        标签=新标签(组,SWT.LEFT);
        label.setText("严重性"); // TODO 使用属性
    
        statusField = new ListSearchField("状态"); //$NON-NLS-1$
        statusField.createControls(组, STATUS_HEIGHT);
    
        分辨率字段 = new ListSearchField("分辨率"); //$NON-NLS-1$
        resolutionField.createControls(组, STATUS_HEIGHT);
    
        typeField = new ListSearchField("类型"); //$NON-NLS-1$
        typeField.createControls(组, STATUS_HEIGHT);
    
        优先级字段 = new ListSearchField("优先级"); //$NON-NLS-1$
        优先级字段.createControls(组, STATUS_HEIGHT);
    
        // 添加严重性字段
        严重性字段 = new ListSearchField("严重性"); //$NON-NLS-1$
        successField.createControls(group, STATUS_HEIGHT);
    
        返回组;
    }
    
    私人无效 updateAttributesFromRepository(最终布尔力){
        ...
    
        statusField.setValues(client.getTicketStatus());
        resolutionField.setValues(client.getTicketResolutions());
        typeField.setValues(client.getTicketTypes());
        priorityField.setValues(client.getPriorities());
    
        // 还更新严重性
        SeniorField.setValues(client.getSeverities());
    
        componentField.setValues(client.getComponents());
        versionField.setValues(client.getVersions());
        MilestoneField.setValues(client.getMilestones());    
    }
    
  7. 现在您已准备好路径插件 jar(例如 org.eclipse.mylyn.trac.ui_3.6.0.v20110608-1400.jar):

    • 用修改后的类覆盖 TracQueryPage.class
    • 从 MANIFEST.MF 中删除 TracQueryPage.class 的“Name:”和“SHA1-Digest:”行
  8. 将插件替换为已修补的插件。然后重新启动 eclipse。

  9. 或者下载已修补的插件:http://franke.ms/download/org.eclipse.mylyn.trac.ui_3.6.0.v20110608-1400-patched.zip

You have to obtain the source for the TracQueryPage.java and add the list for "severity".

  1. http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.6.2/org.eclipse.mylyn.trac/ui/3.4.2/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryPage.java?av=f

  2. Create an empty plugin project in Eclipse (e.g. named trac-connector-patch)

  3. Locate the org.eclipse.mylyn.trac.ui_3.6.0.v20110608-1400.jar in the plugin folder and copy the MANIFEST.MF to the plugin project's META-INF folder. Remove all lines starting with "Name:" and "SHA1-Digest:", then change Bundle-Symbolic-Name to

    Bundle-SymbolicName: org.eclipse.mylyn.trac.ui-patched;singleton:=true

  4. Copy the source for TracQueryPage.java into the source folder as

    src\org\eclipse\mylyn\internal\trac\ui\wizard\TracQueryPage.java

  5. Fix the projects build path:

    • remove the exports from the MANIFEST.MF for org.eclipse.mylyn.internal.trac.ui and org.eclipse.mylyn.internal.trac.ui.editor
    • use the context menu "PDE Tools -> update classpath"
    • if there are still errors for org.eclipse.swt stuff, add the swt jar from the eclipse plugin folder as external jar to the projects build bpath (e.g. org.eclipse.swt.win32.win32.x86_64_3.7.1.v3738a.jar)
  6. Modify the TracQueryPage

    // add a new list search field
    private ListSearchField severityField;
    ...
    
    protected Control createTicketAttributes(Composite control) {
        Composite group = new Composite(control, SWT.NONE);
        GridLayout layout = new GridLayout();
    
        layout.numColumns = 5; // add a column
    
        group.setLayout(layout);
        GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
        gd.horizontalSpan = 1;
        group.setLayoutData(gd);
    
        Label label = new Label(group, SWT.LEFT);
        label.setText(Messages.TracQueryPage_Status);
    
        label = new Label(group, SWT.LEFT);
        label.setText(Messages.TracQueryPage_Resolution);
    
        label = new Label(group, SWT.LEFT);
        label.setText(Messages.TracQueryPage_Type);
    
        label = new Label(group, SWT.LEFT);
        label.setText(Messages.TracQueryPage_Priority);
    
        label = new Label(group, SWT.LEFT);
        label.setText("Severity"); // TODO use a property
    
        statusField = new ListSearchField("status"); //$NON-NLS-1$
        statusField.createControls(group, STATUS_HEIGHT);
    
        resolutionField = new ListSearchField("resolution"); //$NON-NLS-1$
        resolutionField.createControls(group, STATUS_HEIGHT);
    
        typeField = new ListSearchField("type"); //$NON-NLS-1$
        typeField.createControls(group, STATUS_HEIGHT);
    
        priorityField = new ListSearchField("priority"); //$NON-NLS-1$
        priorityField.createControls(group, STATUS_HEIGHT);
    
        // add the severityField
        severityField = new ListSearchField("severity"); //$NON-NLS-1$
        severityField.createControls(group, STATUS_HEIGHT);
    
        return group;
    }
    
    private void updateAttributesFromRepository(final boolean force) {
        ...
    
        statusField.setValues(client.getTicketStatus());
        resolutionField.setValues(client.getTicketResolutions());
        typeField.setValues(client.getTicketTypes());
        priorityField.setValues(client.getPriorities());
    
        // also update the severities
        severityField.setValues(client.getSeverities());
    
        componentField.setValues(client.getComponents());
        versionField.setValues(client.getVersions());
        milestoneField.setValues(client.getMilestones());    
    }
    
  7. Now you are ready to path the plugin jar (e.g. org.eclipse.mylyn.trac.ui_3.6.0.v20110608-1400.jar):

    • overwrite the TracQueryPage.class with your modified class
    • remove the "Name:" and "SHA1-Digest:" lines for the TracQueryPage.class from the MANIFEST.MF
  8. Replace the plugin with your patched plugin. And restart eclipse.

  9. Or download an already patched plugin: http://franke.ms/download/org.eclipse.mylyn.trac.ui_3.6.0.v20110608-1400-patched.zip

捎一片雪花 2025-01-02 11:38:46

查看代码,似乎无法根据严重性进行查询。您可能需要在 https://bugs.eclipse.org/bugs 上提出功能请求。如果您提供补丁就更好了。 :)

Looking at the code, it appears it is not possible to query based on severity. You may want to open a feature request at https://bugs.eclipse.org/bugs. Even better would be if you provided a patch. :)

止于盛夏 2025-01-02 11:38:46

它在表单编辑器中没有带标签的字段,但名称旁边有一个图标。单击该图标您可以定义严重性。

在此处输入图像描述

It does not have a labeled field in the form editor, but there is an icon next to the name. Clicking on that icon you can define the severity.

enter image description here

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