Hi Everyone,
I want to set component/s field of issue when its created with groovy script.
the problem is here : inherited issue object is instance of Issue class.
i have to change it MutableIssue in order to use setComponents(Collection<GenericValue> args) method
i wrote
IssueFactory issueFactory = ComponentManager.getInstance().getIssueFactory();
MutableIssue mi = issueFactory.getIssue(issue.getGenericValue());
mi.setComponents(predefinedCollection);
it doesnt work could you help me ?
The right way to update issues is to call IssueService.update method. It does validations, throws events etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to call mi.store() after you set the components http://docs.atlassian.com/jira/latest/com/atlassian/jira/issue/IssueImpl.html#store()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.