Question in use countIssues(jql) routine by JJupin add-on for jira

colincy August 11, 2016

Hello! I make the program like this,I want get the number through the countIssues(jql),but in fact I get “0”

 

String version;

Number plantask;

Version = V5.8.1

jql = "project = PRJ AND issuetype in (Improvement, 'New Feature') AND fixVersion = 'version'";

plantask = countIssues(jql);

2 answers

3 votes
Michael Partyka
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2016

Hi,

this should solve your problem

https://confluence.kepler-rominfo.com/display/SIL/countIssues

 

For the search query, please use apostrophe(') instead of quotes(") and 
double backslashes(\ \ )for escaping characters (instead of a single 
backslash).
2 votes
Błażej O_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2016

When you set value to string you have to encapsulate it in quotes. Also when you try to "inject" a string into another string you have to use string concatenation. Try this:

 

String version;
Number plantask;
version = "V5.8.1";
jql = "project = PRJ AND issuetype in (Improvement, 'New Feature') AND fixVersion = '"+version+"'";
plantask = countIssues(jql);

 

 

colincy August 11, 2016

it's ok thank you all

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events