Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Using bugzilla as a command

Hi,

First: Thanks to all who have helped us with importing work items from external
sources. We have a repeatable process that we can use.

Next I would like to explore automating this import via a scripted import. I've seen posts mentioning "com.ibm.team.workitem.rcp.core.internal.bugzilla (headless)" and
I know that my RTC client has at least 1 jar file that has a similar path in its jar output
listing.

Being somewhat of a java hack I tried a couple throws at:

java com/ibm/team/workitem/rcp/core/internal/bugzilla/BugzillaImporter

with CLASSPATH trying to be aimed at the jar file location that contains the classes.

Unfortunately it fails (no class found).

Q: Is it possible to use the RTC client install along with an appropriate definition of
CLASSPATH to use the importer ? If so I'd be grateful for some more detailed
instructions.

TIA

Kevin

0 votes



2 answers

Permanent link
Ok,

I'm beyond getting a launch of the BugzillaCommandLineImporter and am now battling the
configuration file so that I can specify a custom mapping file.

repository.uri=https://myrepo.ibm.com:9443/jazz
repository.username=ramerk@us.ibm.com
repository.password=redacted
repository.projectarea=Prelude
import.source=zipfile
import.filename=/home/ramerk/apars1103.zip
import.bugzilla.baseurl="http://home.net"
import.bugzilla.projectarea=Prelude
import.bugzilla.needsauth=no
/debug/bugzilla/verbose=true
import.bugzilla.needsauth=no
import.bugzilla.authmethod=realm
import.bugzilla.username=na
import.bugzilla.password=na
import.bugzilla.from.id=
import.bugzilla.to.id=
import.bugzilla.product=
import.bugzilla.savedownloadeddata=no
import.bugzilla.savedownloadeddata.filename=
import.bugzilla.savedownloadeddata.filename.overwrite=no
bugzilla.usecustommapping=true
bugzilla.custommappingfile=/home/ramerk/taddm-rtc/taddm-apars.xml
import.bugzilla.usecustommapping=true
import.bugzilla.custommappingfile=/home/ramerk/taddm-rtc/taddm-apars.xml


I wrote a wrapper that will slurp all the 'plain java' jar files into classpath and execute a
wrapper program. With the above configuration I'm getting this:

Logged in now.
Importing from /home/ramerk/apars1103.zip
Importing bugs, please wait...
Importing Work Items
Exception in thread "main" java.lang.NullPointerException
at com.ibm.team.workitem.client.internal.AuditableClient.resolveAuditable(AuditableClient.java:123)
at com.ibm.team.workitem.common.internal.WorkItemCommon.findRootCategory(WorkItemCommon.java:619)
at com.ibm.team.workitem.common.internal.AuditableCommon.findDefaultDevelopmentLine(AuditableCommon.java:66)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.BugzillaImporter.runImport(BugzillaImporter.java:130)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.BugzillaImporter.access$0(BugzillaImporter.java:116)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.BugzillaImporter$1.run(BugzillaImporter.java:111)
at com.ibm.team.workitem.common.internal.util.Utils.runImport(Utils.java:437)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.BugzillaImporter.doImport(BugzillaImporter.java:109)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.commandline.BugzillaCommandLineApplication.importBugs(BugzillaCommandLineApplication.java:221)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.commandline.BugzillaCommandLineApplication.run(BugzillaCommandLineApplication.java:131)
at snippets.Bugzilla.main(Bugzilla.java:17)


Can someone PLEASE advise about the property definitions as I think this is my only
holdout. Most of the properties are described in the BugzillaCommandLineImporter, others
are in the UI form of the class, so I'm having to reverse engineer and just plain make
wild guesses.

TIA

0 votes


Permanent link
I have solved this issue and now can use Bugzilla imports as a command.
I had to modify the BugzillaCommandLineApplication with some new property
keywords and to grab the mapping file and attach to the BugzillaConfiguration.



Ok,

I'm beyond getting a launch of the BugzillaCommandLineImporter and am now battling the
configuration file so that I can specify a custom mapping file.

repository.uri=https://myrepo.ibm.com:9443/jazz
repository.username=ramerk@us.ibm.com
repository.password=redacted
repository.projectarea=Prelude
import.source=zipfile
import.filename=/home/ramerk/apars1103.zip
import.bugzilla.baseurl="http://home.net"
import.bugzilla.projectarea=Prelude
import.bugzilla.needsauth=no
/debug/bugzilla/verbose=true
import.bugzilla.needsauth=no
import.bugzilla.authmethod=realm
import.bugzilla.username=na
import.bugzilla.password=na
import.bugzilla.from.id=
import.bugzilla.to.id=
import.bugzilla.product=
import.bugzilla.savedownloadeddata=no
import.bugzilla.savedownloadeddata.filename=
import.bugzilla.savedownloadeddata.filename.overwrite=no
bugzilla.usecustommapping=true
bugzilla.custommappingfile=/home/ramerk/taddm-rtc/taddm-apars.xml
import.bugzilla.usecustommapping=true
import.bugzilla.custommappingfile=/home/ramerk/taddm-rtc/taddm-apars.xml


I wrote a wrapper that will slurp all the 'plain java' jar files into classpath and execute a
wrapper program. With the above configuration I'm getting this:

Logged in now.
Importing from /home/ramerk/apars1103.zip
Importing bugs, please wait...
Importing Work Items
Exception in thread "main" java.lang.NullPointerException
at com.ibm.team.workitem.client.internal.AuditableClient.resolveAuditable(AuditableClient.java:123)
at com.ibm.team.workitem.common.internal.WorkItemCommon.findRootCategory(WorkItemCommon.java:619)
at com.ibm.team.workitem.common.internal.AuditableCommon.findDefaultDevelopmentLine(AuditableCommon.java:66)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.BugzillaImporter.runImport(BugzillaImporter.java:130)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.BugzillaImporter.access$0(BugzillaImporter.java:116)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.BugzillaImporter$1.run(BugzillaImporter.java:111)
at com.ibm.team.workitem.common.internal.util.Utils.runImport(Utils.java:437)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.BugzillaImporter.doImport(BugzillaImporter.java:109)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.commandline.BugzillaCommandLineApplication.importBugs(BugzillaCommandLineApplication.java:221)
at com.ibm.team.workitem.rcp.core.internal.bugzilla.commandline.BugzillaCommandLineApplication.run(BugzillaCommandLineApplication.java:131)
at snippets.Bugzilla.main(Bugzilla.java:17)


Can someone PLEASE advise about the property definitions as I think this is my only
holdout. Most of the properties are described in the BugzillaCommandLineImporter, others
are in the UI form of the class, so I'm having to reverse engineer and just plain make
wild guesses.

TIA

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Nov 04 '08, 4:41 p.m.

Question was seen: 7,671 times

Last updated: Nov 04 '08, 4:41 p.m.

Confirmation Cancel Confirm