I'm trying to set up a Ticket Service between Jira Service and Jira Software and i'm using JMWE to create an issue at the Dev Project from a transition of an issue at Service Project. Watching videos on hoow to use JMWE i noticed that my options at "Link to new Issue" don't show the "Creates" or "is created by". I've tried to use other options like "Clones" or "Duplicates" but none of them worked.
What i have to do to display this "Creates" option at "Link to new issue" on JMWE post-function?
Hi @Lucas Souza ,
I believe what you're trying to achieve during the "Enviar para Dev" transition is to create a new Bug issue (which you already managed using the "Create Issue(s)" post function, and immediately transition that new Bug from its initial status ("To Do") to the "Bugs Reportados" status.
This can be achieved by putting your "Create Issue(s)" post function inside a "Sequence of Post-functions" post function, and then adding in that Sequence a "Transition Issue(s)" post function to trigger the "Bugs Reportados" transition (or whatever that transition is called) on the newly created Bug.
The trick is to select "Issues returned by the following Nunjucks template:" under "Target Issue(s)" and use this template:
{{ context.newIssueKey }}
This returns the key of the issue that was created by the "Create Issue(s)" post function inside the same "Sequence of Post-functions". This way the newly created bug will be transitioned to the desired status.
Hi David,
Would it be something like this?
I think i'm missing something at this Transition Post-function...
I tried like this and end up at "To do" again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lucas Souza
As I mentioned earlier, you need to put both post functions inside a "Sequence of post functions" post function. This is because of a Jira cloud limitation.
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.
Glad to hear that.
Note that you can "Accept" this answer as well, so that others can find it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lucas,
In the "Create issue(s)" post-function, JMWE should show every issue link available in your Jira instance. Is it possible that you don't have the "Created" / "Created by" link? Could you open an existing issue, link it to another issue, and see which links are available to you?
As a Jira Admin, you can also navigate to "Issue Linking" in the "Issues" Jira settings section to see a full list of your issue links.
Cheers,
Evn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I just saw that "Issue Linking" list and didn't have the "Creates/Is created by" link. I do have the possibility to create a new link but it seems odd once its just a text format. Will this new link work just by creating the "Creates" link?
Thanks for your answer!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lucas,
What are you trying to accomplish? If you really want a "Creates" link in your Jira instance to be used in general, you can add it here. But you definitely don't need it for this function to work. You can leave the link blank in the JMWE post function, or you could choose one of your existing links.
Cheers,
Evn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Evn,
I'm trying to create a Post-Function where my support team send an issue to my Dev team. This creating an issue is working fine now (thanks to your previous answer). Now my problem is that this new issue created isn't going to the right "status". At my Workflow is this transition is set to go from "Open" to "Reported Bugs" (status at the Jira Software) but it keep ending at my Jira Software Backlog.
Is there any specific post-function to solve this problem?
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lucas,
This is going to be based on the Workflow of the new issue type. Would you be able to post a screenshot of the new issue, and detail where you want it to end up and where it is automatically ending up?
Thanks!
-Evn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Evn,
This is my Jira Service Workflow, where my support team creates a issue and send it to the "Bugs Reportados" (Reported Bugs). Most of the issue's type is going to be "Bug". The transition i've been editing is "Enviar para Dev" (Send to Dev). "Bugs Reportados" is a status and a column at Jira Software KBN Table.
Now the problem is that the new issue is created at Jira Software backlog instead of being visible at the KBN Column of "Bugs Reportados".
Now, this is the workflow at Jira Software (is evident that the problem must be here somewhere...)
The new issue is being created as "Bug" but at the "To do" status. I want to, when selected the transition "Send to Dev" at Jira Service, send the new issue directly to "Bugs Reportados" at Jira Software.
I don't know if i was clear enought but thanks for helping!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
EDIT: While this all should work, David's solution below is much more elegant. Do his solution, and ignore mine ;)
Hi Lucas,
So what we need to do here is transition the issue from To Do to Bugs Reportados. There are two different ways we can do that - either in the Jira Service Management workflow, or in the Jira Software workflow.
I think I would probably do it in the JSM workflow, as it's a bit simpler, so let me start there.
Edit the JSM Workflow and just after the "Create issue(s)" post function, add "Transition issue(s)". Change "Target issue(s)" to "Issues linked to the current issue through the following link type:" and select the Issue Link type that you're using. Under transitions, use the Transition Picker button, change the workflow to the Jira Software workflow, and find the "Tudo" transition that moves the Jira Software issue to "Bugs Reportados". Change "Run As" if you need to (if everyone has the permission to fire this transition, you can leave it as Current User - if users can create in this project, but can't transition, you may need to change this). Finally, check the box under "Conditional execution" and add:
{{ issue.fields.project.key == 'KEY' }}
Replacing 'KEY' with the project key of the Jira Software Project. This just insures that if the issue happens to be linked to an issue in some other project, this post function won't try to transition it. This should be all set you need to do, and the JSM issue will then create a new issue and transition that new issue.
Now, if you want to do it in the Jira Software workflow, the way we're going to do it is by looking for something unique about the ticket, and transitioning automatically when we see that unique thing.
Begin by editing the Jira Service Management workflow, and update the Create issue(s) post function that is creating this issue. Add something unique to the issue - it could be something in the summary like "[Customer Bug]" or a label like "bugs-reportados" - whatever makes sense to you, just make sure that you're adding something that wouldn't normally be added to a new issue in this project. It's probably easiest to do with a label, so I'll explain that way, assuming you give the new issue the "bugs-reportados" label. Save that post function and workflow.
Once you've done that, edit the Jira Software workflow and add the "Transition issue(s)" post function. Leave Target Issue(s) on "Current Issue" then click on "Transition Picker" under "Transition(s)" and select the "Tudo" transition that moves to "Bugs Reportados". Choose the user to run as (someone who has permission to transition issues in this project). Then scroll down to "Conditional Execution", check the box, and add:
{{ issue.fields.labels | find("bugs-reportados") }}
Add that post function, and now when you create issues from the JSM project, they'll be created with the "bugs-reportados" label, which will cause them to transition to that status.
So either of these methods should work. I'd probably start with doing it from the JSM Workflow.
Let me know how that goes!
Cheers,
Evn
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.