How do I run a global search in DOORS? - ibm-doors

Background
I am trying to search for specific a specific string of text that I know exists in multiple modules. However, I forget all the modules that contain this text.
Question
Does DOORS have a global search function? That is, can it search for text that exists in multiple modules as opposed to the current selected module?

Tools->Find.
Though this only looks in Object Text and Object Heading of each module.

Also, there is a "global search utility tool" available at https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014289994
Note that the last lines of the script have been garbled. The script must end like this:
if (fillModsList(GSUModList) == 0) {
insert(GSUModList, 0, "(No modules)")
}
show GSUBox, "(No modules)"

Related

How to export all attributes of a DOORS module

I want to send all possible attributes of a DOORS module, which is quite large. How can I easily send my colleague all attributes of the DOORS module, so that he can tell which attributes he wants to be exported to him?
I'm looking for an out-of-the-box solution, which does not require an DXL script or something complex. I just don't want to send a bunch of screenshots to my colleague, as there are really plenty of attributes.
I think the simplest solution would indeed be a DXL script that prints all attributes. It's not even complicated, it only depends on which information you want to give to your colleague. If you only need the name of the attributes, open the module, start Tools->Edit DXL (from the Module explorer, not the database explorer!) and paste the following.
AttrDef ad
print "object specific attributes:\n"
for ad in current Module do { if (ad.object) {print ad.name ","}}
print "\n\n"
print "module specific attributes: \n"
for ad in current Module do { if (ad.module) {print ad.name ","}}
print "\n\n"
Depending on your needs you might want to change the condition to if (ad.object and !ad.system), which will filter out all variables that DOORS provides per default, like Created By, TableCellWidth etc. Also, you might want to print out additional information like ad.typeName (the type of the attribute) or ad.description.

DXL code to copy Layout DXL value to Text attribute in DOORS module

I am trying to copy a layout DXL value (Text) to another Text attribute in the same DOORS module. How can I copy this using DXL script?
Any help would be greatly appreciated, thanks in advance.
You should be able to recover the displayed text from your columns using the text(column c, object o) function (Page 697 of the DXL 9.7 documentation). Just provide the function your DXL column, and then the object from which you want the text, and you should be good to go to copy this in an attribute.
If you're trying to write as little code as possible and not having to worry about setting your view up correctly to do what Aubert suggested. You can first convert it to an Attribute DXL (Tools >> Support Tools >> Convert Layout DXL to Attribute DXL).
Then you can run something like this, make sure to replace the less/greater than signs (<>) and everything between it:
Object o
for o in entire(current Module) do
{
o."<NAME OF TARGET ATTRIBUTE>" = o."<NAME OF NEW ATTRIBUTE DXL>""" // replace <>s too
}
I'm assuming the reason you want to copy it is because you want to keep specific versions of that DXL attribute?

Is there a method to display dynamic information to the user BEFORE a build?

Within the Jenkins UI, on the project page, you can use the Description Setter plugin to set a description AFTER a build. Is there any way to dynamically set this before a build? I would want to pull information from a file in the workspace that shows information about files that will be changed when the user builds the project.
Edit: While I haven't found a way to dynamically set the project description, I did find that I can create an Active Choices Reactive Reference Parameter, give it a descriptive name that serves as a title, and then read the contents of a file containing HTML with a Groovy script like so..
// The contents of the file should be HTML
String contents = new File('/tmp/some_file.html').text
return contents
So I made this my last parameter, and it shows the information that I need to show, before the end user clicks the build button. Solves my problem.
I'm going to leave this question open though, in case someone has a better idea.
While I haven't found a way to dynamically set the project description, I did find that I can create an Active Choices Reactive Reference Parameter (this requires the Active Choices plugin),
Give it a descriptive name that serves as a title, and then read the contents of a file containing HTML with a Groovy script like so..
// The contents of the file should be HTML
String contents = new File('/tmp/some_file.html').text
return contents
You will need to select a Choice Type of: Formatted HTML.
So I made this my last parameter, and it shows the information that I need to show, before the end user clicks the build button. Solves my problem.

How do I disable Filtering in a DXL script?

I have a script that I'm working and noticed that some objects are being found. I think I've traced the issue to the fact that the default view has filtering associated with it. I'd like to know how to disable filtering in DXL or change the view of the module that I've opened to "Standard View"
To turn off the filter:
filtering off
To change the view in the current module:
View v = view("Standard")
load(v)
I recommend checking out Help -> DXL Reference Manual from inside the DOORS Client. From the index tab you can search all the published functions.

How can I find out what Change template a DOORS Module is using?

I need to use DXL to loop through all modules in our database and find out which Rational Change Template each module is using, and possibly switch it to a different one. Can't find any documentation on Change API for DOORS.
I had to contact IBM directly to get this information. But here it is if anyone else needs to do it.
Skip cfgData = createString
string current_template = ""
getModuleConfigurationData(m, cfgData)
find(cfgData, CSINT_CONFIG_USE_TEMPLATE, current_template)
delete cfgData
At this point current_template has the file name of the template that it is configured for. This can be used to compare to existing templates and verify it is set correctly.
Also, if an update is necessary the following function will save the skip list back to the configuration.
put(cfgData, CSINT_CONFIG_USE_TEMPLATE, new_template)
cmSaveModuleConfigurationData(m, cfgData)

Resources