Hello
We need to perform some actions with tasks in epic. But nothing happens when the script is executed.
Example script:
string jql = "issueFunction in hasLinkType(\"Epic-Story Link\") and key = " + key +"";
string [] selectedIssues = selectIssues(jql);
for(string sKey in selectedIssues){
autotransition(1481,%sKey%.key);
}
What could be wrong? Any ideas?
Hi try it:
string jql = "key in issueInEpics("+ key +")";
https://confluence.cprime.io/display/JJUPIN/Pre-defined+JQL+functions
Thanks! But we don't have this function.
As I understand it, it is available in version 4.1.1. Power Scripts. We have version 4.0.2.
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.
Maybe it will work
string [] selectedIssues =allLinkedIssues(key
,
"Epic-Story Link"
)
;
for(string sKey in selectedIssues){
autotransition(1481,%sKey%.key);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does not work. If step by step output the script operation to the log, then nothing works after the line " for(string sKey in selectedIssues){".
As if "selectedIssues" doesn't work, but this is my guess.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you run test script in console?
string x = //any Epic key with someEpic-Story Link
string [] selectedIssues =allLinkedIssues(x
,
"Epic-Story Link"
)
;
return selectedIssues;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Returns task numbers.
"Done. Program returned: INFOPRJ-43167|INFOPRJ-43169"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, but if I change the line from "autotransition" to output the value "sKey" to the log, then the log is empty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can I specify an empty field or not in the condition? Can it work like this?
if(#{Epic Link}!=""){autotransition(1481,key)};
I try, but nothing happens either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The script works correctly. It turned out that the problem was related to updating the NFEED field on the automatic transition. I will deal with it further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Helen Porter If you need help with an Elements Connect field (formerly nFeed), don't hesitate to contact our support portal :
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.