{"id":1240,"date":"2014-10-09T13:44:42","date_gmt":"2014-10-09T11:44:42","guid":{"rendered":"http:\/\/www.capri-soft.de\/blog\/?p=1240"},"modified":"2014-10-09T13:45:48","modified_gmt":"2014-10-09T11:45:48","slug":"ibm-doors-dxl-a-layout-dxl-column-that-shows-the-differences-to-a-previous-baseline","status":"publish","type":"post","link":"https:\/\/www.capri-soft.de\/blog\/?p=1240","title":{"rendered":"IBM Doors DXL: A Layout DXL column that shows the differences to a previous baseline"},"content":{"rendered":"<h1>Problem<\/h1>\n<p>A Layout DXL Column script should show the differences to another baseline<\/p>\n<h1>Approach<\/h1>\n<ul>\n<li>Right-click column header<\/li>\n<li>Select &#8222;New&#8220;<\/li>\n<li>Choose &#8222;Layout DXL&#8220;\u00a0 radio button<\/li>\n<li>Click on the browser button<\/li>\n<li>Click on New<\/li>\n<li>Insert the script below<\/li>\n<li>Be\u00a0aware to have all line breaks in the code like below<\/li>\n<\/ul>\n<p>Replace {baselineToCompare} to the major version that you want to compare with the current version.<\/p>\n<h1>Solution<\/h1>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n\/\/ This script shall be replace {baselineToCompare}\r\n\/**************************************************\r\n * Author: Bj\u00f6rn Karpenstein\r\n * Date:   2014-10-09\r\n *\r\n * This is a layout DXL to show the differences from \r\n * the current version to another baseline. \r\n **************************************************\/\r\nBaseline oldBaseline = baseline({baselineToCompare}, 0,&quot;&quot;);\r\n\r\nBuffer bBefore = create;\r\nBuffer bAfter = create;\r\nBuffer result = create;\r\nAttrDef ad;\r\n\r\nModule oldModule = load(module(obj), oldBaseline, false)\r\nModule currModule = current\r\nshowDeletedObjects(true)\r\nint i = obj.&quot;Absolute Number&quot;\r\nObject oldObject = object(i, oldModule)\r\n\r\nvoid compareColumn(string columnName)\r\n{\r\n  ad = find(oldModule, columnName);\r\n\t\t\r\n  if(!null(ad) &amp;amp;&amp;amp; !null(oldObject))\r\n  {\r\n    bBefore = oldObject.columnName;\r\n  }\r\n  else bBefore = &quot;&quot;;\r\n\t\t\r\n  ad = find(currModule, columnName)\r\n\r\n  if(!null(ad))\r\n  {\r\n    bAfter = obj.columnName;\r\n  }\r\n  else bAfter = &quot;&quot;;\r\n\t\t\r\n  bAfter = obj.columnName;\r\n\r\n  if( bBefore != bAfter )\r\n  {\r\n    diff(result, bBefore, bAfter);\r\n    displayRichWithColor(&quot;{\\\\b &quot; columnName &quot; CHANGED}&quot;);\r\n    displayRichWithColor(stringOf(result));\r\n  }\r\n}\r\n\t\t\t\t\r\nif(null(oldObject))\r\n{\r\n  displayRichWithColor(&quot;{\\\\b NEW}&quot;);\r\n  if(isDeleted(obj)) displayRichWithColor(&quot;{\\\\b DELETED}&quot;);\r\n}\r\nelse\r\n{\t\t\t\r\n  if(isDeleted(obj) &amp;amp;&amp;amp; !isDeleted(oldObject))\r\n  {\r\n    displayRichWithColor(&quot;{\\\\b DELETED}&quot;);\r\n  }\r\n  else\r\n  {\r\n    if(!isDeleted(obj) &amp;amp;&amp;amp; isDeleted(oldObject))\r\n    {\r\n      displayRichWithColor(&quot;{\\\\b UNDELETED}&quot;);\r\n    }\r\n  \r\n    \/\/ Here you can add the \r\n    \/\/ module attributes to compare\t\r\n\t\t\r\n    \/*** BB_ReqStatus ***\/\t\t\r\n    compareColumn(&quot;BB_ReqStatus&quot;);\r\n\t\r\n    \/*** BB_Type ***\/\r\n    compareColumn(&quot;BB_Type&quot;);\r\n\r\n    \/*** Last Modified On ***\/\r\n    compareColumn(&quot;Last Modified On&quot;);\r\n\t\t\r\n    \/*** Object Heading ***\/\r\n    compareColumn(&quot;Object Heading&quot;);\r\n\r\n    \/*** Object Text ***\/\r\n    compareColumn(&quot;Object Text&quot;);\r\n  }\r\n}\r\n\t\t\r\ndelete bBefore;\r\ndelete bAfter;\r\ndelete result;\r\n<\/pre>\n<iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https%3A%2F%2Fwww.capri-soft.de%2Fblog%2F%3Fp%3D1240&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:450px;margin-top:5px;\"><\/iframe>","protected":false},"excerpt":{"rendered":"<p>Problem A Layout DXL Column script should show the differences to another baseline Approach Right-click column header Select &#8222;New&#8220; Choose &#8222;Layout DXL&#8220;\u00a0 radio button Click on the browser button Click on New Insert the script below Be\u00a0aware to have all line breaks in the code like below Replace {baselineToCompare} to the major version that you &hellip; <a href=\"https:\/\/www.capri-soft.de\/blog\/?p=1240\" class=\"more-link\"><span class=\"screen-reader-text\">IBM Doors DXL: A Layout DXL column that shows the differences to a previous baseline<\/span> weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[22,19],"tags":[],"class_list":["post-1240","post","type-post","status-publish","format-standard","hentry","category-dxl","category-ibm-doors"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4yGeN-k0","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1240"}],"version-history":[{"count":2,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1240\/revisions"}],"predecessor-version":[{"id":1242,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1240\/revisions\/1242"}],"wp:attachment":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}