Remove a component from an issue in Jira

37 views Asked by At

I would like to write code in order to remove a component from an issue. For example, there is a component called WF-EDA and I would like to write code in order to delete it. How can I do this? 

enter image description here

1

There are 1 answers

0
منى On BEST ANSWER
                    issueLinkManager.createIssueLink(newIssueCreatedID, myissueID, issueLinkType, sequence, authenticationContext.getLoggedInUser())
                    Collection<ProjectComponent>  componentList2=issue.getComponents()
                    log.warn("MOUNA CAMELIA COMPONENT LIST 2 "+ componentList2)

                    componentList2.removeAll(issue.getComponents())
                    log.warn("MOUNA CAMELIA COMPONENT LIST 2 "+ componentList2)
                    projectComponentManager.updateIssueProjectComponents( issue, componentList2)