Im trying to create a blocked step in my task workflow where lets you enter a issue key in a string field on a popup screen and then create a blocked by link in the JWME add on.
im trying to use the "Link issues to the current issue (JMWE add-on)" function but i can't get it to work
my screen looks like this
Any ideas if this is possible or not
Regards
/Mikael
I actually managed to figure it out
I used the following groovy in the
Link Issues to the Current Issue Post-function
<% if (issue.get("Blocked By"))
print "issuekey=${issue.get("Blocked By")}"
else
print "issuekey=INVALID-1"
%>
and in the validator
issue.get("Blocked By") != null
Then in the blocking task i added the following with the
Transition Related Issues Post-function trigger
<%
value = issue.getLinkedIssues("blocks");
if (value) {
sb = new StringBuilder();
value.each {
status = ComponentAccessor.issueManager.getIssueObject(it.toString()).getStatus().getName();
if (status == "Blocked"){
if (sb.length() > 0 )
sb.append(", ");
sb.append(it)
}
}
String result = sb.toString()
if (sb)
print "issuekey in (${sb})";
else
print "issuekey = IN-1";
}
else
{
print "issuekey = IN-1";
}
%>
and in the validator
issue.getLinkedIssues("blocks").size > 0
Hi Mikael,
are you on Jira Server/DC or Jira Cloud? It's possible on both but the solution is slightly different. In both case, you'll use the Link Issue(s) post-function with a simple JQL expression, but the syntax is slightly different.
As for John's comment, it's true (but of course only on Jira Cloud) with the caveat that Automation is only free for project-specific rules (rules that apply only to a single project). Global and multi-project rules are limited to 500 rules executions per month (across all rules) unless you have a Jira Premium subscription. And one rule execution, in a case like this, means one transition on one issue, so unless you only have a few users, you'll hit the limit very very quickly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well said!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mikael - Welcome to the Atlassian Community!
You might try doing that with Automation For Jira, which is now free in Jira. It will provide you more flexibility and ease of use.
However, you can contact David and his crew with JMWE with a support ticket and they will help you out. :-)
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.