Hello, im beginning with SIL and Power Scripts, however whether i try to create my first script:
string [] fields = getIssueFieldNames(issue.key);
string customKpiField = "";
for(string _fieldName in fields){
if(contains(toLower(_fieldName), "kpi")){
customKpiField = _fieldName;
}
}
logPrint("Error", "KPI Field: "+customKpiField);
I get the following errors:
I assume all errors are because of the function getIssueFieldNames therefore it takes a null as a type declaration and everything else...
can i get some help please?
Hello,
Your script should look like this:
string [] fields = getIssueFieldNames(key);
string customKpiField = "";
for(string _fieldName in fields){
if(contains(toLower(_fieldName), "kpi")){
customKpiField = _fieldName;
}
}
logPrint("Error", "KPI Field: "+customKpiField);
You get the key of an issue by calling the key variable, not issue.key
yes, you are totally right, however that function is still not getting recognized:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is your SIL engine? It is available from 3.0.8
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm in Jira Cloud so... I assume it's the latest since i installed the plugin the last week, if not... how can i see which version is my Jira using ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The getIssueFieldNames(issueKey) method is not available for Jira Cloud, unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.