2013-06-10 3 views
1

Jira 문제를 생성 할 수 있어야합니다. 하지만 문제를 추가 할 프로젝트를 선택할 때도 다른 프로젝트에도 추가 할 수 있어야합니다. 그래서 제가 가지고있는 문제는 두 팀 모두에서 해결할 수 있습니다.Jira- 하나의 이슈를 만들었지 만 두 개의 프로젝트에 포함되어 있습니다.

두 가지 문제가 발생하여 유지 관리해야하므로 복제 또는 링크가 필요하지 않습니다.

누구와 관련하여 어떤 생각을 갖고 있습니까? 새로운 플러그인을 개발할 것인가?

+1

나를 위해 두 가지 문제를 관리하기 때문에 그 도움이되지, 게으른 나에게 전화하지 말아 주시기 바랍니다 문제가되지 않습니다. 그러나 우리 회사의 상황은 서로 다른 시간에 다른 프로젝트 팀이 수행 할 수있는 많은 문제가 있음을 보여줍니다. 따라서 두 가지가 아니라 한 가지 문제 만 편집해야합니다. 어느 것이 시간 소모적이며 더 생산적인 작업을합니다. – KeithC

+0

하나의 쟁점을 가지고 그곳에서 작업 할 때 다른 프로젝트로 옮기는 것이 어떻습니까? 다른 프로젝트에서 그쪽으로 향하는 자리 표시자를 가질 수 있습니다. – Benjamin

+0

@KeithC 나는 당신을 게으른 사람이라고 부르지 않았다. 나는 네가 누구인지 물었다. (따라서'? '). 대부분의 개발자는 좋은 특성 (예 : DRY)으로 게으르다. 왜 팀으로 분리 된 프로젝트를 가지고 있는지 이해할 수 없습니다. IMHO 프로젝트가 소스 코드 저장소에 연결되어야하므로 수정 된 버그와 관련된 변경 사항을 볼 수 있습니다. 나도 여러 버그를 제기하기를 원했지만, 종속적 인 프로젝트 (예 : 종속성 또는 라이브러리)로 인해 문제를 해결할 수있는 두 가지 팀이 있기 때문에 문제가 발생했습니다. –

답변

0

이 작업은 Script Runner add-on을 사용하여 수행 할 수 있습니다. 다른 프로젝트에서 동일한 문제가 발생하는 create 전환에 스크립트를 추가하기 만하면됩니다. 스크립트에 대한

코드 (자신에 대한 모든 아이디의 변경) :

from com.atlassian.jira.util import ImportUtils 
from com.atlassian.jira import ManagerFactory 
from com.atlassian.jira.issue import MutableIssue 
from com.atlassian.jira import ComponentManager 
from com.atlassian.jira.issue.link import DefaultIssueLinkManager 
from org.ofbiz.core.entity import GenericValue; 

# get issue objects 
issueManager = ComponentManager.getInstance().getIssueManager() 
issueFactory = ComponentManager.getInstance().getIssueFactory() 
authenticationContext = ComponentManager.getInstance().getJiraAuthenticationContext() 
issueLinkManager = ComponentManager.getInstance().getIssueLinkManager() 
customFieldManager = ComponentManager.getInstance().getCustomFieldManager() 
userUtil = ComponentManager.getInstance().getUserUtil() 
projectMgr = ComponentManager.getInstance().getProjectManager() 
customFieldExample = customFieldManager.getCustomFieldObjectByName("custom Field Example") 

# define new issue 
issueObject = issueFactory.getIssue() 
issueObject.setProject(projectMgr.getProject(10000)) # set which project 
issueObject.setIssueTypeId("1") # which issue type 
# set issue attributes 
issueObject.setSummary("[copy from ...] "+issue.getSummary()) 
issueObject.setAssignee(userUtil.getUserObject("John")) 
issueObject.setReporter(issue.getAssignee()) 
issueObject.setDescription(issue.getDescription()) 
issueObject.setCustomFieldValue(customFieldExample, issue.getCustomFieldValue(customer_email)) 
issueObject.setComponents(issue.getComponents()) 
# Create new issue 
newIssue = issueManager.createIssue(authenticationContext.getUser(), issueObject) 
# Link parent issue to the new one 
issueLinkManager.createIssueLink(issueObject.getId(),issue.getId(),10003,1,authenticationContext.getUser()) # change to your link id 
# Update search indexes 
ImportUtils.setIndexIssues(True); 
ComponentManager.getInstance().getIndexManager().reIndex(newIssue) 
ImportUtils.setIndexIssues(False)