Managing components using JRJC is very similar to managing versions.
A new component can be added into a project as follows:
Create a
ComponentInput
object with the necessary details:ComponentInputcomponentInput = new ComponentInput("JRJC", "Test", "jobinkk", AssigneeType.COMPONENT_LEAD);
Use the
createComponent
method onComponentRestClient
:Promise<Component>component = jiraRestClient .getComponentRestClient() .createComponent("DEMO", componentInput);
Once a component is created, you can retrieve it any time using the component URI:
Promise<Component>component= jiraRestClient.getComponentRestClient().getComponent(componentURI);
Given a component, you can update it by sending a new ComponentInput
object with updated parameters. For example, if you want to change the project lead to "test", you can do it as...