{"id":1226,"date":"2014-10-08T11:45:58","date_gmt":"2014-10-08T09:45:58","guid":{"rendered":"http:\/\/www.capri-soft.de\/blog\/?p=1226"},"modified":"2014-10-09T12:07:47","modified_gmt":"2014-10-09T10:07:47","slug":"ibm-doors-dxl-get-last-baseline-version-as-string","status":"publish","type":"post","link":"https:\/\/www.capri-soft.de\/blog\/?p=1226","title":{"rendered":"IBM Doors DXL: Get last baseline version as String"},"content":{"rendered":"<h1>Problem<\/h1>\n<p>The last version of a baseline shall be retrieved as String<\/p>\n<h1>Approach<\/h1>\n<p>With the usage of the standard methods, the string can be returned<\/p>\n<ul>\n<li>Baseline=getMostRecentBaseline(Module) &#8211; Holt die letzte BL<\/li>\n<li>bool=baselineExists(Module,Baseline) &#8211; Existiert die BL?<\/li>\n<li>string=major(Baseline) &#8211; Versionsnummer VOR Komma<\/li>\n<li>string=minor(Baseline) &#8211; Versionsnummer NACH Komma<\/li>\n<li>string=suffix(Baseline) &#8211; Anh\u00e4ngsel sichtbar in BL Liste<\/li>\n<li>string=dateOf(Baseline) &#8211; Datum der Baseline<\/li>\n<li>string=annotation(Baseline) &#8211; Bemerkung zur Baseline<\/li>\n<\/ul>\n<p>The version can be retrieved as string.<\/p>\n<h1>Solution<\/h1>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nstring getLastBaselineVersionString(Module ModRef)\r\n{\r\n  string myBase=&quot;N\/A;&quot; \r\n  Baseline b = getMostRecentBaseline(ModRef);\r\n  if (b != null &amp;amp;&amp;amp; baselineExists(ModRef,b));\r\n  {\r\n    myBase = (major b) &quot;.&quot; (minor b) &quot;&quot;;\r\n    if ((suffix b) != &quot;&quot;)\r\n    { \r\n      myBase = myBase &quot;(&quot; (suffix b) &quot;)&quot;;\r\n    }\r\n\t\t\r\n    myBase = myBase &quot; \/\/&quot; dateOf(b) &quot;&quot;;\r\n    if ((annotation b) != &quot;&quot;)\r\n    {\r\n\tmyBase = myBase  &quot; &quot; (annotation b) &quot;&quot;;\r\n    }\r\n  }\r\n  return myBase\r\n}\r\n<\/pre>\n<iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https%3A%2F%2Fwww.capri-soft.de%2Fblog%2F%3Fp%3D1226&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 The last version of a baseline shall be retrieved as String Approach With the usage of the standard methods, the string can be returned Baseline=getMostRecentBaseline(Module) &#8211; Holt die letzte BL bool=baselineExists(Module,Baseline) &#8211; Existiert die BL? string=major(Baseline) &#8211; Versionsnummer VOR Komma string=minor(Baseline) &#8211; Versionsnummer NACH Komma string=suffix(Baseline) &#8211; Anh\u00e4ngsel sichtbar in BL Liste string=dateOf(Baseline) &#8211; &hellip; <a href=\"https:\/\/www.capri-soft.de\/blog\/?p=1226\" class=\"more-link\"><span class=\"screen-reader-text\">IBM Doors DXL: Get last baseline version as String<\/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":[1,22,19],"tags":[],"class_list":["post-1226","post","type-post","status-publish","format-standard","hentry","category-allgemein","category-dxl","category-ibm-doors"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4yGeN-jM","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1226","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=1226"}],"version-history":[{"count":4,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1226\/revisions"}],"predecessor-version":[{"id":1238,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1226\/revisions\/1238"}],"wp:attachment":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}