I'm trying to write a process to import records into a stateful defect record. My problem is how do I get it into the proper state and how do I get all of the other fields to translate properly? My script calls BuildEntity, which on a stateful record, executes a Submit action. So after this is done and I validate and commit I'll get a defect in the Submitted state. But the defect I'm importing was in the Assigned state. If I feed State = 'Assigned' into the process Clearquest tells me that the State field is readonly. Similarly other fields such as say Category are marked as readonly during submission, but perhaps optional in another state.
I know this can be done because the klunky Clearquest Import Records from the Clearquest client manages to do this somehow.
Now I guess I could do a complicated algorithm to figure out what state transitions I need to do and in what order to do them to get from say Submitted -> Verified but I'd have no way that I can see to know in which state transition I need to set Category or some other field at the proper time.
So how does one do this?
This topic has been locked.
Pinned topic Importing defects
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Re: Importing defects2012-11-09T17:49:30ZThis is the accepted answer. This is the accepted answer.A little research here has led me to believe that the Import action is what I want. But how do I call Import from Perl?
pdubovitsky 100000N35Y376 Posts
Re: Importing defects2012-11-16T18:26:26ZThis is the accepted answer. This is the accepted answer.
- pdubovitsky 100000N35Y
I've submitted a defect to IBM 88995 227 000 <https://www-947.ibm.com/support/servicerequest/problemDescriptionSelect.action?srNumber=88995&branch=227&retainCountryCode=000&sourceAppl=XSR&sourceNode=prNode1&sourceTranId=1831353088981136&draft=0&userType=0>
Product or Service: Rational ClearQuest for Windows 7.1.2
Component ID: 5724G3600
Operating System: Windows (Microsoft)
How to call the Import action from a Perl script
I wish to import records into Clearquest. I know of the process to
import records using the Clearquest client but that's GUI only and
can't be automated. So I wrote a perl script which imports stateless
records pretty easily by simply adding them. But stateful records are
I've read in the Clearquest API Reference manual about the Import
action but I saw no API to the Import action.
Stated differently, I believe that BuildEntity of a stateful record by
default calls the Submit action and has no parameters to tell it to
instead call the Import action. I could attempt to call the EditEntity
action with the Import action but that fails with:
CRMUD0012E The actionDef Import is of type IMPORT, but must be one of
these types: AD_MODIFY or AD_CHANGE_STATE. at (eval 17)[C:/Program
Files/IBM/RationalSDLC/common/lib/perl5/5.8.6/perl5db.pl:628] line 2.
Business impact ( BusImpact )
Unable to easily populate test Clearquest databases.