Is there a way to set dynamically the "Target Project field" when cloning and linking an Issue?
I mean, put a customField with all projects, and the analyst choose it from a list and the cloned issue will be set on that Target project.
Thanks for your answers in advance.
Thanks for the reply, unfortunately my "project List" custom field it won't work as expected.
It return a weird kind of value =\
By the way, i'm used this:
def cfObj = customFieldManager.getCustomFieldObject('customfield_11501') def cfValue = issue.getCustomFieldValue(cfObj) issue.setProjectObject (cfValue)
and, my custom field return This:
assert cfValue==cfObj | | | | | Project List | false
[id:10800, originalkey:CRW, description:, counter:76, name:Change Request, lead:039020, avatar:10011, assigneetype:3, key:CRW, url:]
When i was trying a workaround i made it work.
Here are the code:
import com.atlassian.jira.ComponentManager; import com.atlassian.jira.issue.CustomFieldManager; import com.atlassian.jira.issue.fields.CustomField; import com.atlassian.jira.issue.IssueManager; import com.atlassian.jira.issue.Issue; import com.atlassian.jira.issue.MutableIssue; CustomFieldManager customFieldManager = ComponentManager.getInstance().getCustomFieldManager(); CustomField customFieldProj = customFieldManager.getCustomFieldObjectByName("Project List"); def projVal = issue.getCustomFieldValue(customFieldProj) //.toString() issue.setProject (projVal)
Thanks a lot Jamie i was unable to resolve this without your simple help.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in talking to 20 people planning t...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs