Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to used JMWE Link issues to the current issue post-function

Tyas Iglecias November 24, 2021

Hi Guys,

 

I Have 3 Issue type

issuetype A can triger create Issuetype B and C

the resuld is issuetype can be linked issue A-B and A-C

 

what I want automate link issue B-C because,  if issue B changed status to drop, issue C change to Drop too.

 

I try to used JMWE Link issues to the current issue post-function in workflow B

and input 

Issues to link

JQL expression : issuetype = "C"

JMWE.JPG

after I test it,

Workflow issue B linked to issue C but not from issue C in same project where is it made

 

the question is, how to make specific project in JMWE-JQL?

 

1 answer

1 accepted

0 votes
Answer accepted
David Fischer
Community Champion
November 24, 2021

Hi @Tyas Iglecias 

How are you creating issues B and C? If you're using a JMWE Create Issues post function, then you can refer to 

https://innovalog.atlassian.net/wiki/spaces/JMWEC/pages/1110605827/Advanced+configuration+and+usage+of+the+Create+issue+s+post-function#Link-newly-created-issues

 

Best

David

Tyas Iglecias November 25, 2021

Hi @David Fischer 

 

Thanks for the reference,



I used JMWE for create Issue B and C 
if Issuetype A created, it triger JMWE for creating Issuetype B and C
and it make link Issue A-B and A-C

what I need to make automate Link issue B-C

B and C create at same time

x.JPG

 

Regards,
Tyas

David Fischer
Community Champion
November 26, 2021

Hi Tyas,

if we assume that your current Iterator is something like:

[
{
"summary":"Issue B"
},
{
"summary":"Issue C"
}
]

which you use to create two issues, each with a different summary.

You can update the iterator to this:

[
{
"summary":"Issue B"
},
{
"summary":"Issue C",
"issueLinks": [
{"linkName":"blocks","toIssue":1}
]
}
]

This will automatically link issue C to issue B through the "blocks" link type direction.

Tyas Iglecias November 30, 2021

Hi @David Fischer ,

thanks for your information

like I discribe in my first question, I have 3 Issuetype (All of it different type)

but I thinks you assume B and C in same Issuetype,

 

I assume, that you are using : Create issue(s) post-function

and  "Summary" in your script is from this one? (CMIIW)

summary.JPG

 

And, issuetype A trigger create 2 another issue B and C ( same issuetype) with different summary


but mine is that Issuetype A can create Issuetype B and Issuetype C ( for now I can Create this by JMWE) and what I need to do is automatic to link an issuetype B and  issuetype C.

David Fischer
Community Champion
November 30, 2021

Hi @Tyas Iglecias 

what I described works - you can create both issues using a single Create Issue(s) post-function, by selecting "Calculated" as the Issue Type, with this value:

{{it.issueType}}

and as the iterator, use:

[
{
"summary":"Issue B",
"issueType":"Issue type for B"
},
{
"summary":"Issue C",
 "issueType":"Issue type for C"
"issueLinks": [
{"linkName":"blocks","toIssue":1}
]
}
]

 and for the Summary field, use

{{it.summary}}
Tyas Iglecias December 1, 2021

Hi @David Fischer 

 

thanks for the script

 

I follow your guide,

 1.JPG2.JPG3.JPG4.JPG

but, I get error

errorx.JPG

 

I try some condition for solving missing Issuetype from

https://innovalog.atlassian.net/wiki/spaces/JMWEC/pages/1110605827/Advanced+configuration+and+usage+of+the+Create+issue+s+post-function#Link-newly-created-issues

 

example :

{{ issue.fields.issuetype.name }}

{{ issue.fields.issuetype.name == "Story" }}

 

please help find what is missing

Regards,
Tyas 

David Fischer
Community Champion
December 1, 2021

Hi @Tyas Iglecias ,

sorry, I forgot to mention that, since the iterator script returns a JSON object, you need to check the "Iterator returns JSON" option.

Best,

David

Tyas Iglecias December 1, 2021

Dear @David Fischer 

 

Thanks for your guide it's work,

one more thing we missed was a comma,


comma.JPG

 

and I check from your guide in confluence

comma2.JPG

 

its solved my issue

 

thanks very much
Tyas

Rizky.Tuasikal
Contributor
December 3, 2021

@David Fischer 

I have question,

How to link multiple issue with JMWE using iteration?

Example:

  1. Creation of Issue A triggers creation of issue B, issue C, and issue D.  Issue A is linked to Issue B, Issue C, and issue D.
  2. However, issue B is only linked to issue A and issue C. And, issue D is only linked to issue A and Issue C.
  3. We want for issue B to link to all issue.  And same for Issue C and issue D, it should be linked to all issue

can you help me? 

David Fischer
Community Champion
December 3, 2021

@Rizky.Tuasikal did you read the documentation I shared earlier, and the example above?

If you still can't figure it out, can you open a support request with us: https://innovalog.atlassian.net/servicedesk/customer/portals

Suggest an answer

Log in or Sign up to answer