Create a Release with plain java API
Hello,
4 answers
The New and Noteworthy mentions:
You can now associate multiple global configurations to a release. The mapping between a global configuration and a release is managed in the Global Configuration Management application. You can also create or modify reports against a configuration-scoped Report Builder data source to see release-specific work item relationships with versioned artifacts.
Comments
See https://jazz.net/library/article/96597 how this is done and it is not done in EWM. the IDeliverable interface remains unchanged.
Thank you!
Thank you!
The question, why IDeliverable has no method for setting the GC, sounds reasonable for me.
Because the GC refers to the deliverable using a link and not the other way around? This allows the EWM API to keep compatible and there is no need for UI changes, except the ability to choose an active configuration. In addition, it is the developers choice how they implement capabilities.
I found this questions https://jazz.net/forum/questions/207552/where-is-the-restoslc-api-for-crud-of-rtc-releases on the forum and it uses another type of implementation and I tried to add a configuration to a release with this and it worked. But I'm wondering if it safe to use it. Do you have any idea?
That is not a supported method and it also does not create a relationship to a global configuration management element. So do not use that aPI.
The question, why IDeliverable has no method for setting the GC, sounds reasonable for me.
The proper answer to this question would have been that a Release doesn't have a GC attribute and therefore also no setGC() method. Releases and GCs are associated via link and the Link API needs to be utilized for defining a GC for a Release.
I struggle with why we are still discussing this in the context of RTC. If one would take 5 minutes of time to look into how releases are related to global configuration, one can see that that relationship is not created or managed in EWM/RTC but in the Global configuration management tool by creating a link to the release object. At least that is my conclusion since I looked into this.
Comments
It's a valid question for 7.0.2+ (aka 7.0.2 iFix008a) and later, when the EWM release to GC link was reinstated.
I am able to link a release to a global configuration from the GC perspective using the GCM REST API. After I link it, the release is visible only in the global configuration, not in the EWM so I thought that the relationship to be bidirectional, I should link the global configuration also from the EWM.
David is likely better prepared to answer this, but to my knowledge the GC->Release is only maintained in the Global configuration. You have to select the global configuration in EWM to make it aware of the link (note different behavior across different patches).
It would have been desirable not to have to do such drastic changes in a patch, but the users demanded it.
Also note, even if a connection would be bidirectional, it would be a wrong assumption that the connection would be stored at both ends. Something like a link indexer would be enough. In the EWM case as you have to select the global configuration you want to work with, EWM knows what you want to see and does not even need the opposite direction.
I am able to link a release to a global configuration from the GC perspective using the GCM REST API. After I link it, the release is visible only in the global configuration, not in the EWM so I thought that the relationship to be bidirectional, I should link the global configuration also from the EWM.
ILinkManager linkManager = (ILinkManager) teamRepository.getClientLibrary(ILinkManager.class); String configurationURI = "https://jazz.server.net/gc/configuration/256"; IReference source = IReferenceFactory.INSTANCE.createReferenceToItem(release); IReference target = (IReference) IReferenceFactory.INSTANCE.createReferenceFromURI(URI.create(configurationURI)); ILink link = linkManager.createLink(WorkItemLinkTypes.CONTRIBUTES_TO_CONFIGURATION, source, target); linkManager.saveLink(link, monitor);
BR, Stefan