Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Create a link to an issue from an custom field value with the jmwe add-on

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

 

Capture.PNG

3 answers

1 accepted

0 votes
Answer accepted

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.

John Funk Community Leader Mar 27, 2020

Well said!

0 votes
John Funk Community Leader Mar 27, 2020

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.  :-)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Bitbucket Smart Commits vs. Genius Commits - What's the difference?

If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...

130 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you