Copy Custom Fields to Linked Issues
Here is a simple JJupin SIL script that will allow you to copy Custom Fields to linked issues.
In this script we verify the Project (projectId) and issuetype (issueTypeId). We also go as far as verifying the 'link type' (Depends) and that it is 'incoming'.
if(projectId == 11567) //My Project
{
if(issueTypeId == 16) //My Issuetype
{
string [] linkedIssues = linkedIssues(key,"Depends",-1); //Extracting Links from source issues - Only link type "Is Depended On By"
for (string issue in linkedIssues) //Pushing Source Issue Field 1 and Source Issue Field 2 to the linked issues referenced above
{
%issue%.#{Linked issue field 1} = %key%.#{Source Issue Field 1};
%issue%.#{Linked issue field 2} = %key%.#{Source Issue Field 2};
}
}
}
In this script we verify the Project (projectId) and issuetype (issueTypeId). We also go as far as verifying the 'link type' (Depends) and that it is 'incoming'.
if(projectId == 11567) //My Project
{
if(issueTypeId == 16) //My Issuetype
{
string [] linkedIssues = linkedIssues(key,"Depends",-1); //Extracting Links from source issues - Only link type "Is Depended On By"
for (string issue in linkedIssues) //Pushing Source Issue Field 1 and Source Issue Field 2 to the linked issues referenced above
{
%issue%.#{Linked issue field 1} = %key%.#{Source Issue Field 1};
%issue%.#{Linked issue field 2} = %key%.#{Source Issue Field 2};
}
}
}
Comments
Post a Comment