Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: CP status report using DXL
Topic Summary:
Created On: 29-Jul-2003 18:54
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Roosevelt Simmons, on Friday, March 11, 2005 4:48 PM

Answer:
David,

Here is my email id. please send your script.


roosevelt.simmons@baesystems.com
 29-Jul-2003 18:54
User is offline View Users Profile Print this message


Ananda Badugu

Posts: 20
Joined: 3-Feb-2003

Hi

We have 10 systems, we created each system have on project in DOORS, under each DOORS project have different modules (Test plan, Requirements, Test Strategies). Each project have change proposal folder. every week we have some changes in each DOORS Project. Now I'm generating report in the following way.

I'm login in each change proposal module filtering by In-review or New or creating date. It take's so much time to complete all the projects.

Now I want to write DXL script, which filters based on the condition for all the projects.

is it possible to write DXL script?. if yes, could any one help us.


Thanks
Ananda

Report this to a Moderator Report this to a Moderator
 22-Oct-2003 15:17
User is offline View Users Profile Print this message


David Rose

Posts: 80
Joined: 10-Oct-2003

Give me your email address and I'll send you a script we use to get metrics out of our projects. You should be able to modify it to get what you're looking for.

** Dec 01, 2003
Cut and pasted the code into the message for all interested parties.


The metrics shall include:
Requirement Module Name
Number of objects
Number of requirements being satisfied (in-coming links)
Number of requirements satisfying upper level requirements (out-going links)
Number of requirements for each "Data Type"
Number of requirements for each "Priority"
Number of requirements for each "Requirement Status"
Number of requirements for each "Release Status"
Number of requirements for each "Source"
Number of requirements with and without a "Fit Criterion"
Number of requirements with or without a "Rationale"
Number of requirments with or without "Supporting Material"
Number of additions to requirements from last baseline
Number of subtractions of requirements from last baseline
Number of modifications to requirements from last baseline
Percent deviation from last baseline


The metrics report is written to a file located at C:/ProjMetric.txt.*/

string p = ""
Object o
Link l
Object s
Module m = current
ModName_ lkMod // Name of the module for a linked
Baseline b
Object baseO
int numobj,numlnko,numlnki
int lenmod,cidx,reqcidx
int reqAdds = 0 //additional requirements from last baseline
int reqSubs = 0 //deleted requirements from last baseline
int reqMods = 0 //modified requirements from last baseline
int totalReqs = 0 //total requirement changes since last baseline
string baseAbsNo //baseline absolute numbers
string baseTxt //baseline text
string dType //datatype check
string relStat //release status check
string oTxt //current module text
string oAbsNo //current module absolute numbers
string ckmod,stmod,tst,mtype
bool nolink
bool haslnko,haslnki
bool found = false



pragma runLim,0
filtering off

// Check the user is in a requirements module
string cmodname = m."Name"
cmodname = cmodname[0:2]
if (cmodname != "REQ") {
ack "This function can only be run from a requirements module."
halt
}

// Get all of the data types and store in array for display
AttrType typdt = find(m,"AllDataTypes")
int numdt = typdt.size + 1
string otype[numdt]
int numotype[numdt]
otype[0] = ""
numotype[0] = 0
cidx = 1
while (cidx < numdt) {
otype[cidx] = typdt.strings[cidx-1]
numotype[cidx] = 0
cidx++
}

// Get all of the priority and store in array for display
AttrType typhml = find(m,"1thru5Priority")
int numhml = typhml.size + 1
string hmlo[numhml]
int numhmlo[numhml]
hmlo[0] = ""
numhmlo[0] = 0
cidx = 1
while (cidx < numhml) {
hmlo[cidx] = typhml.strings[cidx-1]
cidx++
}

// Get all of the requirement status and store in array for display
AttrType typrstat = find(m,"AllReqStatus")
int numrstat = typrstat.size
string allrstat[numrstat]
int numallrstat[numrstat]
cidx = 0
while (cidx < numrstat) {
allrstat[cidx] = typrstat.strings[cidx]
cidx++
}

// Get all of the releases and store in array for display
AttrType typrel = find(m,"AllReleaseStatus")
int numrel = typrel.size + 1
string release[numrel]
int numrelease[numrel]
release[0] = ""
numrelease[0] = 0
cidx = 1
while (cidx < numrel) {
release[cidx] = typrel.strings[cidx-1]
cidx++
}

// Get all of the sources and store in array for display
AttrType typsource = find(m,"AllSources")
int numsour = typsource.size + 1
string source[numsour]
int numsource[numsour]
source[0] = ""
numsource[0] = 0
cidx = 1
while (cidx < numsour) {
source[cidx] = typsource.strings[cidx-1]
cidx++
}


// Open the file for the metrics report and record the project name and date
string filename = "C:/Req Metric.txt"
Stream wfile = write filename
wfile << "\t\t\t\t" name(current Project) " Metrics"
wfile << "\t\t\t" today "\n\n"


// Gather metrics for the current project
for p in current Project do {
ckmod = p
Module n = read(ckmod,false)

// Check the module is a requirement module
mtype = type n
string modname = n."Name"
string modtyp = modname[0:2]
if ((mtype == "Formal") && (modtyp == "REQ")) {

// Clear all counts for each module
//print reqAdds ", "reqSubs ", "reqMods", "totalReqs"\t"
numobj = 0
numlnko = 0
numlnki = 0
reqAdds = 0
reqSubs = 0
reqMods = 0
totalReqs = 0
reqcidx = 0
int ratno = 0
int ratyes = 0
int fitno = 0
int fityes = 0
int smno = 0
int smyes = 0

// print modname"\n"
for (cidx=0;cidx<numdt;cidx+=1) {
numotype[cidx] = 0
}
for (cidx=0;cidx<numhml;cidx+=1) {
numhmlo[cidx] = 0
}
for (cidx=0;cidx<numrstat;cidx+=1) {
numallrstat[cidx] = 0
}
for (cidx=0;cidx<numrel;cidx+=1) {
numrelease[cidx] = 0
}
for (cidx=0;cidx<numsour;cidx+=1) {
numsource[cidx] = 0
}


// Gather metrics on the requirement module
for o in n do {
numobj++
haslnko = false
haslnki = false

// Count objects at each data type
tst = probeAttr_(o,"Data Type")
for (cidx=0;cidx<numdt;cidx+=1) {
if (tst == otype[cidx]) {
numotype[cidx] = numotype[cidx] + 1
}
if(otype[cidx]=="Requirement") totalReqs=numotype[cidx]
}

if (tst == "Requirement"){
// tst = probeAttr_(o,"Release Status") //& comment out for all requirements
// if (tst == "Current Release"){ //& comment out for all requirements

//count requirement objects of current release
//reqcidx++ //& comment out for all requirements

// Count objects at each priority
tst = probeAttr_(o,"Priority")
for (cidx=0;cidx<numhml;cidx+=1) {
if (tst == hmlo[cidx]) {
numhmlo[cidx] = numhmlo[cidx] + 1
} //
}

// Count objects at each requirement status
tst = probeAttr_(o,"Requirement Status")
for (cidx=0;cidx<numrstat;cidx+=1) {
if (tst == allrstat[cidx]) {
numallrstat[cidx] = numallrstat[cidx] + 1
} //
}

// Count objects at each release status
tst = probeAttr_(o,"Release Status")
for (cidx=0;cidx<numrel;cidx+=1) {
if (tst == release[cidx]) {
numrelease[cidx] = numrelease[cidx] + 1
}

}

// Count objects at each source
tst = probeAttr_(o,"Source")
for (cidx=0;cidx<numsour;cidx+=1) {
if (tst == source[cidx]) {
numsource[cidx] = numsource[cidx] + 1
}

}

//Check to see if the Rationale has been established
tst=probeAttr_(o,"Rationale")
if (tst==null) ratno++ else ratyes++

//Check to see if the Fit Criterion has been established
tst=probeAttr_(o,"Fit Criterion")
if (tst==null) fitno++ else fityes++

//Check to see if the Supporting Material has been established
tst=probeAttr_(o,"Supporting Material")
if (tst==null) smno++ else smyes++

// Count the number of objects with in-coming links
for stmod in o <- "LNK-Satisfies_Links" do {
lkMod = module(stmod)
string modName = name(lkMod)
modName = modName[0:2]
if (modName == "REQ") haslnki = true
}

if (haslnki) ++numlnki

// Count the number of objects with out-going links
for l in o -> "LNK-Satisfies_Links" do {
ModName_ lckMod = target(l)
string modName = name(lckMod)
modName = modName[0:2]
if (modName == "REQ") haslnko = true
}
if (haslnko) ++numlnko
// } //& comment out for all requirements
}
} // End for o in n

//checking to see if the module had been baselined
for b in n do
{
found = true
}
if (!found) then
{
wfile << "\n"modname" has not been baselined.\n"
}
else
{
found = false
b = getMostRecentBaseline(n)
Module baseMod=load(n,b,false)

//checking to see if there is any objects added or modification since last baseline
for o in n do
{
dType = probeAttr_(o,"Data Type")
if (dType=="Requirement")
{
oTxt = probeAttr_(o,"Object Text")
oAbsNo = probeAttr_(o,"Absolute Number")
bool baseExist = false
for baseO in baseMod do
{
baseAbsNo = probeAttr_(baseO,"Absolute Number")
if (oAbsNo == baseAbsNo)
{
baseExist=true
baseTxt = probeAttr_(baseO,"Object Text")
if (baseTxt != oTxt) reqMods++
baseTxt = probeAttr_(baseO,"Data Type")
if (baseTxt != dType) reqAdds++
break
}
}
if (!baseExist) reqAdds++
}
}
//checking to see if any object have been deleted since the last baseline
for baseO in baseMod do
{
dType = probeAttr_(baseO,"Data Type")
if (dType=="Requirement")
{
baseExist = false
baseAbsNo = probeAttr_(baseO,"Absolute Number")
for o in n do
{
oAbsNo = probeAttr_(o,"Absolute Number")
if (baseAbsNo == oAbsNo)
{
baseExist = true
baseTxt = probeAttr_(o,"Data Type")
if (dType != baseTxt) reqSubs++
break
}
}
if (!baseExist) reqSubs++
}
}
}


// Write the module data gathered to the file
lenmod = length modname
wfile << "" modname "\n"
wfile << "\tNumber of Objects = " numobj "\n"
wfile << "\tData Types\n"
for (cidx = 0;cidx<numdt;cidx+=1) {
if (otype[cidx] == "") then {
wfile << "\t\tNot Assigned A Value = " numotype[cidx] "\n"
} else {
wfile << "\t\t" otype[cidx] " = " numotype[cidx] "\n"
}
}
wfile << "\tRequirements Drift\n"
devBase = 0
if (totalReqs != 0)
{
devBase = intOf(((realOf(reqMods)+realOf(reqAdds)+realOf(reqSubs))/realOf(totalReqs))*100.0)
}
wfile << "\t\tModifications = "reqMods"\n\t\tAdditions = "reqAdds"\n\t\tSubtractions = "reqSubs"\n\t\tTotal Requirements = "totalReqs"\n\t\tDeviation from Baseline = "devBase"%\n"

wfile << "\n\t********** Requirements Only **********\n\n" //& Modify to say "Requirements Only"

//wfile << "\tCurrent Release Requirements = "reqcidx"\n\n" //& comment out for All Requirements
wfile << "\tNumber of Requirements being Satisfied (In-coming Links): " numlnki "\n"
wfile << "\tNumber of Requirements Satisfying Upper Requirements(Out-going Links): " numlnko "\n"
wfile << "\tPriorities\n"
for (cidx = 0;cidx<numhml;cidx+=1) {
if (hmlo[cidx] == "") then {
wfile << "\t\tNot Assigned A Value = " numhmlo[cidx] "\n"
} else {
wfile << "\t\t" hmlo[cidx] " = " numhmlo[cidx] "\n"
}
}
wfile << "\tRequirement Status\n"
for (cidx = 0;cidx<numrstat;cidx+=1) {
wfile << "\t\t" allrstat[cidx] " = " numallrstat[cidx] "\n"
}
wfile << "\tRelease Status\n" //& Remove commenting for all Requirements
for (cidx = 0;cidx<numrel;cidx+=1) {
if (release[cidx] == "") then {
wfile << "\t\tNot Assigned A Value = " numrelease[cidx] "\n"
} else {
wfile << "\t\t" release[cidx] " = " numrelease[cidx] "\n"
}
} //& Remove commenting for all Requirements
wfile << "\tFit Criterion\n"
wfile << "\t\tNot Assigned a Value = "fitno"\n"
wfile << "\t\tAssigned a Value = "fityes"\n"


wfile << "\tSource\n"
for (cidx = 0;cidx<numsour;cidx+=1) {
if (source[cidx] == "") then {
wfile << "\t\tNot Assigned A Value = " numsource[cidx] "\n"
} else {
wfile << "\t\t" source[cidx] " = " numsource[cidx] "\n"
}
}
wfile << "\tSupporting Material\n"
wfile << "\t\tNot Assigned a Value = "smno"\n"
wfile << "\t\tAssigned a Value = "smyes"\n"
wfile << "\tRationale\n"
wfile << "\t\tNot Assigned a Value = "ratno"\n"
wfile << "\t\tAssigned a Value = "ratyes"\n"

} // End if (ckmod == "Formal") etc.

if ((p != "Users") && (m != n)) close n
} // End for p in current Project do
close(wfile)
infoBox "All Requirements Metrics Report Complete.\n File located at C:/Req Metric.txt." //& Modify to say "All Requirements Metrics"





-------------------------
David A. Rose TSgt USAF
NCOIC System Administration


Edited: 1-Dec-2003 at 18:16 by David Rose
Report this to a Moderator Report this to a Moderator
 29-Oct-2003 19:00
User is offline View Users Profile Print this message


Ananda Badugu

Posts: 20
Joined: 3-Feb-2003

David,

Here is my email id. please send your script.


araju@seta.com



Thanks
Ananda
Report this to a Moderator Report this to a Moderator
 20-Nov-2003 20:28
User is offline View Users Profile Print this message


Dennis Akkor

Posts: 4
Joined: 19-Sep-2003

Dave,

Can you forward me the script, too. We can also use it here for collecting metrics.

Thank you.

Dennis
Report this to a Moderator Report this to a Moderator
 20-Nov-2003 20:30
User is offline View Users Profile Print this message


Dennis Akkor

Posts: 4
Joined: 19-Sep-2003

Dave,

Please forward it to the following address.

denis.akkor@tma.osd.mil

Thank you

Dennis
Report this to a Moderator Report this to a Moderator
 20-Nov-2003 20:44
User is offline View Users Profile Print this message


Timothy Dowell

Posts: 3
Joined: 18-Oct-2002

Dave
I'd be interested in where the metrics come from. The CP or requirements modules.

Tim Dowell
HE2K Requirements Manager
timothy.dowell@navy.mil
Report this to a Moderator Report this to a Moderator
 21-Nov-2003 14:41
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Any chance you could post it here?
Report this to a Moderator Report this to a Moderator
 21-Nov-2003 15:46
User is offline View Users Profile Print this message


Rosemary Francis

Posts: 3
Joined: 7-Oct-2002

Report this to a Moderator Report this to a Moderator
 21-Nov-2003 15:51
User is offline View Users Profile Print this message


Rosemary Francis

Posts: 3
Joined: 7-Oct-2002

Dave, please send to me too at rosemary.s.francis@bt.com. Thanks
Report this to a Moderator Report this to a Moderator
 27-Feb-2004 08:41
User is offline View Users Profile Print this message


Juergen Albrecht

Posts: 6
Joined: 23-Sep-2002

David,

Here is my email id. please send your script.


albrecht.cad_cam_consulting@T-online.de



Thanks
Juergen
Report this to a Moderator Report this to a Moderator
 7-Oct-2004 15:32
User is offline View Users Profile Print this message


Faulk Keith

Posts: 1
Joined: 7-Oct-2004

David,

Here is my email id. please send your script.


keith.faulk@sypris.com
Report this to a Moderator Report this to a Moderator
 27-Feb-2005 14:46
User is offline View Users Profile Print this message


Roosevelt Simmons

Posts: 1
Joined: 24-Feb-2005

Answer Answer
David,

Here is my email id. please send your script.


roosevelt.simmons@baesystems.com

Edited: 27-Feb-2005 at 14:47 by Roosevelt Simmons
Report this to a Moderator Report this to a Moderator
 1-Sep-2006 18:56
User is offline View Users Profile Print this message


Susan Wang

Posts: 1
Joined: 24-Feb-2006

Hi David,

I copied your scripts and modified to fit our projects. It works for the requirement counts. Thanks

But the total objects have in-coming links seems to count total in-coming links in the module instead of objects have in-coming links base on the scripts below:

(I have replaced your "LNK-Satisfies_Links" to "*". I wasn't sure what "LNK-Satisfies_Links" is referring to.....)


// Count the number of objects with in-coming links
for stmod in o <- "*" do {
lkMod = module(stmod)
string modName = name(lkMod)
modName = modName[0:2]
if (modName == "GCS SRS") haslnki = true
}

Anyone has the same problem?

Thanks
Report this to a Moderator Report this to a Moderator
 16-May-2007 19:44
User is offline View Users Profile Print this message


Karen Pulliam

Posts: 19
Joined: 18-Aug-2006

your code is a little confusing for someone who not a code.  Is there anyway you could specify what we have to customize.  It would really help.

Thanks Karen
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.