简体   繁体   English

JIRA Groovy - 链接另一个项目的问题

[英]JIRA Groovy - Link issues from another project

We have a special Jira setup so that 1 Epic in our master project = 1 Jira project full of stories/bugs/etc (Governance/compliance wanted this) 我们有一个特殊的Jira设置,因此我们的主项目中有1个Epic = 1个充满故事/错误/等的Jira项目(治理/合规需要这个)

Each Issue type has a custom column called 'Ideal days' 每种问题类型都有一个名为“理想日子”的自定义列

For each Epic to get the total estimated days we have a custom function that Sums all 'Ideal days' of issues linked to that Epic that are in the backlog (we manually do this). 对于每个Epic来获得总估计天数,我们有一个自定义函数,该函数总结了与积压中的Epic相关的问题的所有“理想日”(我们手动执行此操作)。

With Groovy Runner can I auto-link all issues in a project (in the backlog) to an Epic? 使用Groovy Runner,我可以将项目中的所有问题(在积压中)自动链接到Epic吗? Thanks 谢谢

There is a built-in script that clones an issue and links it. 有一个内置脚本克隆问题并链接它。 You should be able to link based on that code: https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Clonesanissueandlinks 您应该能够基于该代码进行链接: https//jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Clonesanissueandlinks

If you want to link issues without cloning them, you should use IssueLinkManager.getLinkCollection() . 如果要在不克隆问题的情况下链接问题,则应使用IssueLinkManager.getLinkCollection()

The code should look something something like this: 代码应该看起来像这样:

IssueLinkManager issueLinkManager = ComponentManager.getInstance().getIssueLinkManager()

issueLinkManager.getLinkCollection(someIssue, yourUser).each() {
   it.getOutwardIssues("Some Link Name")
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM