Fix mistake in reference_jira_issue method

Use local variable instead global
Merge pull request #7146 from zzet/patch-11

Fix mistake in reference_jira_issue method (markdown)