{"id":3013,"date":"2019-11-11T14:40:07","date_gmt":"2019-11-11T13:40:07","guid":{"rendered":"http:\/\/www.capri-soft.de\/blog\/?p=3013"},"modified":"2019-11-11T15:13:19","modified_gmt":"2019-11-11T14:13:19","slug":"atlassian-jira-ms-sql-server-get-affects-version-or-fixed-version-from-the-database-by-query","status":"publish","type":"post","link":"https:\/\/www.capri-soft.de\/blog\/?p=3013","title":{"rendered":"Atlassian JIRA MS SQL Server: Get Affects version or fixed version from the Database by query"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Problem<\/h2>\n\n\n\n<p>To fetch the values &#8222;Affects version&#8220; or &#8222;Fixed Version&#8220; from the JIRA Database via SQL, the use of different relations\/tables is necessary<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution &#8211; L\u00f6sung<\/h2>\n\n\n\n<p>You can use the ASSOCIATION_TYPE=&#8217;IssueVersion&#8216; for Affects version and ASSOCIATION_TYPE=&#8217;IssueFixVersion&#8216;  to get the Fixed version<\/p>\n\n\n\n<p>The next example shows how to retrieve Affects Version for Issue-ID AT-15:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\nSELECT projectversion.id, vname, project_key.PROJECT_KEY+&#039;-&#039;+CAST(jiraissue.issuenum AS varchar(max)) as pkey, ASSOCIATION_TYPE\nFROM   projectversion, nodeassociation, jiraissue, project_key\nWHERE  SINK_NODE_ID = projectversion.id\nAND    SOURCE_NODE_ID = jiraissue.id\nAND    project_key.PROJECT_ID=jiraissue.PROJECT\nAND    ASSOCIATION_TYPE=&#039;IssueVersion&#039; \nAND    project_key.PROJECT_KEY+&#039;-&#039;+CAST(jiraissue.issuenum AS varchar(max))=&#039;AT-15&#039;\n<\/pre><\/div>\n\n\n<p><\/p>\n<iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https%3A%2F%2Fwww.capri-soft.de%2Fblog%2F%3Fp%3D3013&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 To fetch the values &#8222;Affects version&#8220; or &#8222;Fixed Version&#8220; from the JIRA Database via SQL, the use of different relations\/tables is necessary Solution &#8211; L\u00f6sung You can use the ASSOCIATION_TYPE=&#8217;IssueVersion&#8216; for Affects version and ASSOCIATION_TYPE=&#8217;IssueFixVersion&#8216; to get the Fixed version The next example shows how to retrieve Affects Version for Issue-ID AT-15:<\/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":[27,11],"tags":[],"class_list":["post-3013","post","type-post","status-publish","format-standard","hentry","category-atlassian-jira","category-ms-sql-server"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4yGeN-MB","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3013","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=3013"}],"version-history":[{"count":2,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3013\/revisions"}],"predecessor-version":[{"id":3015,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3013\/revisions\/3015"}],"wp:attachment":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}