Layout DXL for Object History

Okay I searched through these forums and couldnt find anything.

I'm a newbie and was wondering if someone has already create a layout DXL script that I can drop into a column?

I'm essentially wanting to show object history in the column. Possibly also across baselines and from a particular date.

Any ideas?

Thanks
JacKaL424 - Wed May 26 15:11:21 EDT 2010

Re: Layout DXL for Object History
mcnairk - Wed May 26 15:36:47 EDT 2010

Try this. it has it's limitation but might meet your needs. You will need to place the three inc files (see subsequent postings) in a convenient location, then update the path names in the dxl script.

Good luck!

Ken.
Attachments

attachment_14470872_histcol.dxl

Re: Layout DXL for Object History
mcnairk - Wed May 26 15:37:46 EDT 2010

mcnairk - Wed May 26 15:36:47 EDT 2010
Try this. it has it's limitation but might meet your needs. You will need to place the three inc files (see subsequent postings) in a convenient location, then update the path names in the dxl script.

Good luck!

Ken.

First include file
Attachments

attachment_14470873_dbs.inc

Re: Layout DXL for Object History
mcnairk - Wed May 26 15:38:27 EDT 2010

mcnairk - Wed May 26 15:37:46 EDT 2010
First include file

Second include file
Attachments

attachment_14470874_delta.inc

Re: Layout DXL for Object History
mcnairk - Wed May 26 15:38:59 EDT 2010

mcnairk - Wed May 26 15:38:27 EDT 2010
Second include file

Third include file
Attachments

attachment_14470875_objects.inc

Re: Layout DXL for Object History
mcnairk - Thu May 27 09:08:53 EDT 2010

mcnairk - Wed May 26 15:38:59 EDT 2010
Third include file

I forgot to post this one...
Attachments

attachment_14471209_deltabuff.inc

Re: Layout DXL for Object History
JacKaL424 - Thu May 27 09:44:16 EDT 2010

First off, I want to say thanks. Secondly, when reviewing the dxl before use, it seems that it's only for object text. Anything out there that'd show all attribute history of the object and not just object text?

Re: Layout DXL for Object History
Mathias Mamsch - Thu May 27 09:50:56 EDT 2010

JacKaL424 - Thu May 27 09:44:16 EDT 2010
First off, I want to say thanks. Secondly, when reviewing the dxl before use, it seems that it's only for object text. Anything out there that'd show all attribute history of the object and not just object text?

It is not exactly what you are looking for, but it might help... You can choose the attribute you are interested in (only small changes would be necessary for showing all attributes, just comment out the attribute comparison), it has a GUI for column creation. It does not support baselines yet. Maybe a good starter...

I try posting that thing for the 4th time now. This time as a rar. Maybe it helps.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Attachments

attachment_14471243_makeHistoryColumn.rar

Re: Layout DXL for Object History
mcnairk - Thu May 27 14:58:20 EDT 2010

Mathias Mamsch - Thu May 27 09:50:56 EDT 2010
It is not exactly what you are looking for, but it might help... You can choose the attribute you are interested in (only small changes would be necessary for showing all attributes, just comment out the attribute comparison), it has a GUI for column creation. It does not support baselines yet. Maybe a good starter...

I try posting that thing for the 4th time now. This time as a rar. Maybe it helps.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I should be able to but can't open this file with WinZip. Please repost in some other format.

Thanks,
Ken.

Re: Layout DXL for Object History
mcnairk - Thu May 27 15:07:48 EDT 2010

mcnairk - Thu May 27 14:58:20 EDT 2010
I should be able to but can't open this file with WinZip. Please repost in some other format.

Thanks,
Ken.

Recall my last posting, I am now able to open the rar file.

Re: Layout DXL for Object History
JayashreeRaddi - Wed Apr 06 03:50:36 EDT 2011

Hi,
This forum is very useful. Thanx a lot.
I want to update an attribute "xx" = Changed/ Unchanged based on "Object Heading" change after every import. Kindly provide me the DXL code.
I tried with many given DXLs, getting lot of error with Rational 9.2
Thanks a lot in advance

Re: Layout DXL for Object History
llandale - Wed Apr 06 13:29:05 EDT 2011

JayashreeRaddi - Wed Apr 06 03:50:36 EDT 2011
Hi,
This forum is very useful. Thanx a lot.
I want to update an attribute "xx" = Changed/ Unchanged based on "Object Heading" change after every import. Kindly provide me the DXL code.
I tried with many given DXLs, getting lot of error with Rational 9.2
Thanks a lot in advance

You could go with the History approach, "Is there History for Object Heading", but you'd need to save some date threshold such that History before that date (the previous import date) is ignored.

I'd be tempted to make two text attributes "Imported Text" and "Imported Heading" which are updated right BEFORE you import again. Then you can have some attr-DXL that simply compares "Object Text" with "Imported Text" and "Object Heading" with "Imported Heading", indicating whether there is any difference.

// Run this before the next import
for obj in entire current Module do
{  obj."Imported Text"    = obj."Object Text"  // Raw text is best
   obj."Imported Heading" = obj."Object Heading"
}

 

//  string Attr DXL looks something like:
if (obj."Imported Text" ""    != obj."Object Text" "" or
    obj."Imported Heading" "" != obj."Object Heading" "") //
then obj.attrDXLName = "Updated last Import"
else obj.attrDXLName = "unchanged last Import"

 

 

  • Louie

 

Re: Layout DXL for Object History
bmohamed - Mon Oct 27 12:08:02 EDT 2014

Mathias Mamsch - Thu May 27 09:50:56 EDT 2010
It is not exactly what you are looking for, but it might help... You can choose the attribute you are interested in (only small changes would be necessary for showing all attributes, just comment out the attribute comparison), it has a GUI for column creation. It does not support baselines yet. Maybe a good starter...

I try posting that thing for the 4th time now. This time as a rar. Maybe it helps.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Mathias, I used your makehistorycolumn.dxl and that dialogue generated this layout DXL which I'm using going forward.

I created this thread:  https://www.ibm.com/developerworks/community/forums/html/topic?id=9460b476-e93c-416d-999a-04d14a236bb8#45ad31a2-fe80-407d-b2c9-8476613b84e3

To summarize it: 

I want to reverse the order of output so the most recent changes is at the top of the list.  How can I do this?

I also notice something odd in DOORS(v9.5).  When I first entered new object text(i used the MS Word export to DOORS addin) it lists two history records.  The first one is expected showing 'from' being blank and 'to' being the object text i wanted.  The second entry shows 'from' and 'to' being the same text with no redlines.  Just looks like theres a font/alignment change if that and the date/timestamp for both is exact.y the same.  How can I set a condition so the bogus duplicate date/timestamp doesnt show up?

Is there a way If I select multiple attributes the output is grouped/sorted by date rather than grouped by attribute?  Thanks.

Thanks for the help.

//int dateNumber = 1385269200; Date afterDate = dateOf dateNumber //this int dateNumber was created when I selected 24nov2013 as the date.

Date afterDate = "11/24/2013"//used this hardcoded date rather than the date number.  There will be no DOORS history prior to this date.
//every time the date is pasted to DOORS the quotes need to be retyped.

void defaultDescribeEvent(Object o, string sAttribute, History h, Buffer b)
{
                Buffer v = create()
                Buffer old = create(); old = h.plainOldValue;
                Buffer new = create(); new = h.plainNewValue;

                diff (v, old,new, "\\cf1\\strike ", "\\cf3\\ul ")

//string sRequestedBy = probeRichAttr_(obj, "Requested By", false)

                b += "{\\b On }"
                Date d = h.date
                b += d ""
                b += " {\\b "
                b += h.author ""//change this to sRequestedBy…its not bolding the text though
                b += "} "
                // object modification has old and new values
                b += " modified {\\b "
                b += h.attrName "} "
                b += " \\par "
                b += v
                b += " \\par "

                delete old
                delete new
                delete v
}
string getHistoryForAttributes(Object o, string sAtt, void describeEvent(Object, string, History, Buffer))
{
                History h = null
                HistoryType ht = null
                Buffer b = create()
                for h in o do
                {
                                if(h.readlocked)
                                                continue
                                Date x = h.date

                                if (x < afterDate) continue
                                ht = h.type
                                if (ht == modifyObject)
                                {
                                               string sAttribute = h.attrName
                                               if (sAtt == sAttribute)
                                               describeEvent(o, sAttribute, h, b)
                                }
                }
                string sHistory = stringOf(b)
                delete b
                return sHistory
}
//I added two lines and changed the attribute names and the code pulled those attributes too
displayRichWithColour getHistoryForAttributes(obj, "Object Text", defaultDescribeEvent)
//displayRichWithColour getHistoryForAttributes(obj, "VerificationSectionText", defaultDescribeEvent)
//displayRichWithColour getHistoryForAttributes(obj, "AdminComments", defaultDescribeEvent)

 

Re: Layout DXL for Object History
bmohamed - Mon Nov 03 09:26:59 EST 2014

Mathias Mamsch - Thu May 27 09:50:56 EDT 2010
It is not exactly what you are looking for, but it might help... You can choose the attribute you are interested in (only small changes would be necessary for showing all attributes, just comment out the attribute comparison), it has a GUI for column creation. It does not support baselines yet. Maybe a good starter...

I try posting that thing for the 4th time now. This time as a rar. Maybe it helps.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Where is the attribute comparison line(s) that need to be commented out?  I tried some things and it didnt work.  thanks.

Re: Layout DXL for Object History
Mathias Mamsch - Mon Nov 03 11:18:59 EST 2014

bmohamed - Mon Nov 03 09:26:59 EST 2014

Where is the attribute comparison line(s) that need to be commented out?  I tried some things and it didnt work.  thanks.

This was referring to the original source code part:

...
        if (ht == modifyObject)
                {
                        string sAttribute = h.attrName
                        if (sAtt == sAttribute)
                                describeEvent(o, sAttribute, h, b)
                }
...

which would only show the history for certain attributes ... To show history for all attributes you can obviously comment out the if statement ...

Regards, Mathias

Re: Layout DXL for Object History
bmohamed - Mon Nov 03 12:58:44 EST 2014

Mathias Mamsch - Mon Nov 03 11:18:59 EST 2014

This was referring to the original source code part:

...
        if (ht == modifyObject)
                {
                        string sAttribute = h.attrName
                        if (sAtt == sAttribute)
                                describeEvent(o, sAttribute, h, b)
                }
...

which would only show the history for certain attributes ... To show history for all attributes you can obviously comment out the if statement ...

Regards, Mathias

I commented out line 5 above and that was it.  I could've sworn i did that before without any luck...  guess not...  thanks.