Is it possible to programmatically update the same customization features of a process templates across multiple project areas?
I have a customer who would like to automate the following process:
Modify a process template in a given Project area.
Add custom attributes similar to
<enumeration attributeTypeId=....
<literal default ="true" id=.... name=....
literal id=".... name="..... />
literal id="... name="..... />
literal id="... name="..... />
</enumeration
programatically capture those changes and insert into process template files into
a 100 + existing Projects.
What are the best approches for programmatically implementing this? Is this possible via the API?
How would one get a handle of each named Project area within a RTC / JAZZ server, iterate, and update specifc customized features?
2 answers
If all of the projects were created with the same template, you can write Java code to do the updates by extending the Project Area Updater tooling within the Eclipse client.
See this post for details:
https://jazz.net/forum/questions/43874/template-versioning-application-like-project-area-updater
Martha (Ruby) Andrews
Jazz L3 Development
- update the project area's process from a process template
- synchronize all the work-item in the project area.
final String template = ...
IProjectAreaWorkingCopy prjAreaFreshCopy = ...
IDocument document = prjAreaFreshCopy.getProcessSpecification();
final String xml = document.get();
if (xml.equals(template)) {
return;
}
document.set(template);
prjAreaFreshCopy.save(null);
WorkItemWorkingCopy workingCopy = ...
IWorkItem wiFreshCopy = workingCopy.getWorkItem();
IWorkItemType wiType = ...
boolean changed = workItemClient.updateWorkItemType(wiFreshCopy, wiType, wiType, null);
prjAreaFreshCopy.asyncInitialize(IProcessClientService.ALL_PROPERTIES);There are other actions should we call after saved the project area?
prjAreaFreshCopy.asyncRefresh();
Comments
Please be aware that, for all I know, programmatic modification of the process XML is not a supported scenario and considered dangerous. I am aware that some customers have written tools that do it successfully, but it is discouraged to do so.
There is work in the queue to support more fine grained control of inheriting process configuration changes into projects that are sharing another project areas process.
It is not a really programmatic modification of the process XML. We would just automize the operation of copy & past of the XML that we will manually do for each project area in the repository...