{"id":1094,"date":"2014-01-21T14:34:38","date_gmt":"2014-01-21T13:34:38","guid":{"rendered":"http:\/\/www.capri-soft.de\/blog\/?p=1094"},"modified":"2014-01-21T14:34:38","modified_gmt":"2014-01-21T13:34:38","slug":"jira-6-1-and-above-database-field-pkey-is-empty","status":"publish","type":"post","link":"https:\/\/www.capri-soft.de\/blog\/?p=1094","title":{"rendered":"JIRA 6.1. and above: Database field PKEY is empty"},"content":{"rendered":"<h1>Problem<\/h1>\n<p>In prior versions than JIRA 6.1., the table &#8222;jiraissue&#8220; in the database has stored the Issue IDs and has made it possible to make a selection on Issue IDs. Unfortunalety this field is empty now. It is not possible to select values because of the Issue ID.<\/p>\n<h1>Approach<\/h1>\n<p>Analysing the table shows a new column name &#8222;issuenum&#8220; which can be used in combination with the colum &#8222;project&#8220; to concatenate the Issue Key.<\/p>\n<h1>Solution<\/h1>\n<p>SELECT project_key.PROJECT_KEY+&#8216;-&#8218;+CAST(issuenum AS VARCHAR(5)) as pkey, jiraissue.*<br \/>\nFROM jiraissue<br \/>\nINNER JOIN project_key<br \/>\nON jiraissue.PROJECT=project_key.PROJECT_ID<br \/>\nWHERE project_key.PROJECT_KEY+&#8216;-&#8218;+CAST(issuenum AS VARCHAR(5))=&#8217;VVTT-65&#8216;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https%3A%2F%2Fwww.capri-soft.de%2Fblog%2F%3Fp%3D1094&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 In prior versions than JIRA 6.1., the table &#8222;jiraissue&#8220; in the database has stored the Issue IDs and has made it possible to make a selection on Issue IDs. Unfortunalety this field is empty now. It is not possible to select values because of the Issue ID. Approach Analysing the table shows a new &hellip; <a href=\"https:\/\/www.capri-soft.de\/blog\/?p=1094\" class=\"more-link\"><span class=\"screen-reader-text\">JIRA 6.1. and above: Database field PKEY is empty<\/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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[27],"tags":[],"class_list":["post-1094","post","type-post","status-publish","format-standard","hentry","category-atlassian-jira"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4yGeN-hE","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1094","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=1094"}],"version-history":[{"count":1,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1094\/revisions"}],"predecessor-version":[{"id":1095,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1094\/revisions\/1095"}],"wp:attachment":[{"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.capri-soft.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}