IBM DOORS Analysis Wizard and link modules - analysis

Can you select multiple link modules when running Analysis Wizard? I want to select three link modules from a list of about thirty link modules. I can run Analysis wizard 3x but it would be a better report if I could get all of this link information at once.

If you look at the code generated from the analysis wizard concerning a specific link module, you see the following code
Item linkModItem = itemFromID("52f965671e816bef-00055da2")
[…]
string linkModName = fullName(linkModItem)
for l in all(o->linkModName) do { […] }
You can easily expand this code with a for loop over all relevant link module items

Related

How to Iterate over source objects of incoming links in DXL, in Modules not previously loaded

my question is quite the same as this one :
How to Iterate over target objects of outgoing links in DXL, in Modules not previously loaded
but regarding incoming links.
I would like to use the source objects of incoming links but there are located in module that are not previsously loaded.
I don't want to open and close module each time because it would cost too much time. I would like to open them once and close them at the end.
Two solution for this :
be able to know if the module is already open or not so that I don't open it again (is there a "is_open" function in DXL + store the list of open module in a table and close them all at the end.
or better :
before start of loop, use a loop using the link module and the target module to find all module in the database that could be linked to the target module. And I load them all (even if there is no links between them. But my script would be simpler this way). How can I do this ? I tried something like :
ModName_ src_mod_linkset
for src_mod_linkset in "target_module"<-"linkmodulename" do
{
print "test"
}
but in this kind of loop, it doesn't work because "target_module" should be an object and not the complete module.
https://www.ibm.com/mysupport/s/forumshome has a lot of information on this. A query "Engineering Requirements Management DOORS" incoming links brings you some example scripts. I prefer this approach (load the ModuleVersion if its data is null): https://www.ibm.com/mysupport/s/forumsquestion?language=de&id=0D50z00006HIDztCAH
About "is_open": there is a loop for module in database, which gives you a list of all open modules. You might want to store all open modules at the star of your script in a Skip list and when iterating over the incoming modules check to see whether you have to close the module at the end of your script.
I would not use your second approach if you plan to run your script on baselines, it might happen that the link set in the link module has been deleted in the meantime, so you will not get all possible in links. Anyway, the link modules could be anywhere in your database, not necessarily near your incoming module.

How do I add links to certain code lines of code repro files in VSO/TFS?

I would like to create Issues / Work items / code Review with comments to certain lines of code that directly link to the file and version.
did I miss that feature? or would it be a case for UserVoice* asking for that feature?
(* for which I would not qualify obviously unless MSDN subscriber)
Yes, it is possible for you to add comments to specific code blocks or links.
In the Comments section, select the changed file. Then in the comparison view, right-click in the specific code block and select Add Comment.
Then you will see that the code line information is included in the comments:

Create object link to different DOORS project

Apparently, links are not supposed to connect objects of modules which reside in different projects. I failed trying to create some, both manually as well as DXL-based.
My script
Module modA = edit("/foo/foo", true, false)
Module modB = read("/bar/bar", false)
Object objA = object(1472, modA)
Object objB = object(781, modB)
objA -> objB
The script prints the error:
-R-E- DXL: <Line:78> A linkset pairing restriction prevents the creation of links
from /foo/foo to /bar/bar.
No link will be created.
-I- DXL: execution halted
Is there any trick to bypass that and create a link using magic or hidden features?
That is not a restriction for linking across Projects. This error is telling your two things:
There is no Linkset defined between the two documents specified.
The setting for Mandatory linksets is turned on in the document you are linking from.
I HIGHLY recommend leaving the Mandatory linksets turned on for all modules. Linksets give you the ability to organize the type of links that you are creating. If you turn this off, users can create linksets from anything to anything with any linkset they define on the fly. I have seen this cause big problems at different companies because you can't easily identify what links you want to analyze for traceability.
We have instead created a handful of link modules that we use for all links in our database. For Example:
Traceability Links
Reference Links
Glossary Links
etc...
This way, in any document we can reuse the same views and filters to view traceability across the Project or Projects. We then set up the linksets to use these link modules only.
Long story short, you need to create a linkset between Module A and Module B in Module A properties.

How to put build process parameters into categories in TFS?

When I open up a build definition I can see the arguments are split into sections with a number prefix e.g. 1. Basic, 2. Misc etc.
However, when I edit the xaml there is no indication as to where these categories are defined.
Can someone provide some guidance as to where they are located within the arguments list?
Here is a similar question except the poster has inquired about a different parameter based off the build settings which I believe is a different case than regular parameters.
Missing ProcessParameterMetadata in TFS DefaultTemplate.xaml: where is for e.g. Items to Build in the Required category
You can open the build template and edit the Metadata argument as shown in the picture below:
Then you can edit the category:
In the XML there is no category as standalone. You can define the category in the Process.Metadata section:
<this:Process.Metadata>
<mtbw:ProcessParameterMetadataCollection>
<mtbw:ProcessParameterMetadata Category="#300 Advanced" Description="Enable MSBuid Multi-proc to build your solutions' projects in parallel, when possible, using all available processors on the build server." DisplayName="MSBuild Multi-Proc" ParameterName="MSBuildMultiProc" />
....
</mtbw:ProcessParameterMetadataCollection>
</this:Process.Metadata>
This is to add new categorys but i dont know where the standard categories are.
Hope that helped you.
Chears

How to determine used process template in Team Foundation Server after creation of team project

I'm looking for a way to determine what process template was used for a team project after it has been created. I can now only guess by looking at the work item types. I could not find any option in Visual Studio to retrieve this information. I need to know what processs template was used for team projects not created by myself.
If you check your work item type:
Scrum = Product Backlog Item
Agile = User Story
CMMI = Requirement
For TFS 2010 & TFS 2012, you can follow below process to determine which process template a team project used:
Go to Team Explorer;
Open Documents folder;
Process Guidance;
Open ProcessGuidance.html, this will open specific Process Template documenation that your team project base on.
Refer to thread
There is no way to tell, in general.
If you create (or edit) a process template, you can put an identifier into a property then you will be able to track which projects have your template(s)
To do this:
Edit Classification\Classification.xml
add a node:
tasks/task/taskXml/properties/property
like this:
<property name="templateName" value="myTemplate_1.0.1" />
Once you have projects created with this template, in the object model you will be able to pull this info from a project:
TfsTeamProjectCollection c = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(myuri);
WorkItemStore wis = tpc.GetService();
ICommonStructureService ICss = tpc.GetService();
foreach (Project p in wis.Projects)
{
string ProjectName = string.Empty;
string ProjectState = String.Empty;
int templateId = 0;
ProjectProperty[] ProjectProperties = null;
ICss.GetProjectProperties(p.Uri.ToString(), out ProjectName, out ProjectState, out templateId, out ProjectProperties);
Console.WriteLine("Project: {0}\tTemplate: {1}", ProjectName, ProjectProperties.Where(n => n.Name == "templateName").FirstOrDefault().Value);
}
templateId is always -1 so dont think that will help you.
Also - If you have the rights to, I recommend adding this property into all the templates (even the default templates) in your collection, so that you will be able to track the templates of all future projects. Don't know why they didn't put it in the default templates. (if enough people complain maybe they will)
I found another workaround: in SharePoint Central Administration you can see in the Site Collection list a comment that described the process template that was used. I was actually looking for a way to programatically retrieve it via the TFS API, but could not find it.
Using witadmin, you can list the work item types in the project. The /collection parameter is the TPC url and the /p parameter is the project name. Here is an example (below). If you know the name of a work item type that is specific to a process template, then you know which process template is being used.
Output of command console from my test TFS:
D:\Program Files\Microsoft Team Foundation Server 2010\Tools>witadmin listwitd /collection:http://suluserver:8080/tfs/De
faultCollection /p:"First Team Project"
Bug
Shared Steps
Task
Test Case
User Story
Issue
Risk
User Scenario
Risk-Issue
For visual studio online, go to your collection profile page. You can see all the projects inside your collection including the process template information.
The URL format to your collection page should be:
https://[accountname].visualstudio.com/[collectionname]/_admin
This is definitely late but here's a couple different resources I found while searching:
If you have access to the TFS database: Determine Process Template SQL
Open source WinForms application: https://github.com/renevanosnabrugge/TFS-ProcessTemplateVersionCheck
I don't know a fail proof way to find this out.
I would recommend the following: There is a exe called witexport.exe that can export the xml of a work item. You can then look through the xml to see what kind of template was used. (ie if the conchango template is used you will see references to it.)
To run it fire up the VS Command line prompt (in the start menu). Here is an example run:
witexport /f "C:\Type.xml" /t "http:\MyServer:8080" /p MyProject /n "Sprint BackLog Item"

Resources