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

Automating Issue Creation

Matthew Hine May 22, 2023

Hi,

I'm looking to automate creating a new issue on project 2, when project 1 is transitioned to a given status. I appear to have done this part as it works as I want it to. However, part of the automation is to send an email to advise project 2 that the task has been created and this isnt working as i'd hoped.

Having reviewed other posts on here, I found the user of the "trigger" smart value but believe this will reference project 1 when i want it to quote the issue key and summary for project 2. . Can anyone advise what i need to use? 

Also in future, I would like to look at replacing the email with a comment in jira instead where I would tag the team/users? I assume I would use the "comment on issue" instead and in the comment tag the user(s). Again, how would i ensure that this was added to project 2? 

Automation rule.PNG

Thanks in advance

1 answer

1 accepted

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2023

Hi @Matthew Hine 

Can you provide the rule you created so far?

Matthew Hine May 22, 2023

@Alex Koxaras _Relational_ Apologies, i have now included this. I have removed the email content as it was my work email and didnt quote the subject that i wanted it too.

Please can you also confirm that the "link to issue" will show that the project 2 issue is blocking project 1?

Thanks

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2023

@Matthew Hine thank you for sharing the rule!

Question, why you want to send an email? I mean project 2 will already have a notification scheme, which you can configure and this scheme will send all notifications to the respective people you choose in it. Yes, the link component can link an issue to another.

Keep in mind that you have to have the create issue permission to project 2.

Matthew Hine May 22, 2023

@Alex Koxaras _Relational_ Its part of the current process that we notify the team (project 2) of the issue. Project 2 is currently using the default permissions scheme (used by the majority of projects), so only watchers, reporters and assignees get notified when a issue is created.

We have permissions for project 2, but we're not the admins so are trying not to change too much of what they do. The main aim is to automate the task we create for this team inline with the current process. When time allows, we'll look to review this with them as there are a number of factors impacting this.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

@Matthew Hine thanx for clarifying this. It's understandable. Can you also send me a pic of what the send email component looks like? In addition, who is this team that needs to be notified? Have you tried placing them inside a group and then place the group name inside the recepient?

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

@Matthew Hine and in order to comment on the most recent created issue, you can add a branch rule:

comment on newly created issue.png

However you should change the rule's scope to multiple projects in order to be able to use this component properly.

Matthew Hine May 23, 2023

@Alex Koxaras _Relational_ - I have only created something using test projects at the moment. The automation works, so the new task is created on project 2 and a note i added to confirm this in project 1. It also sends the email as its meant to. The issue is the subject quotes the key and description for project 1, where as I need it to quote the information for project 2. Just need to understand what smart value (or prefix to the smart value i am using e.g. issue.key/issue.description.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

Then use the branch rule and place there the send email component. Then use the {{issue.key}} smart value

Matthew Hine May 23, 2023

@Alex Koxaras _Relational_ - Great, thanks, i will give this a try and get back to you :-)

Matthew Hine May 23, 2023

@Alex Koxaras _Relational_ - i have added the branch rule as you sugested above. Unfortunately, the rule is restricted to project 1 only. It doesn't let me remove this or add any other projects. It says underneath this section "Only issues from the above projects will be considered. You can change this restriction in the 'Rule details' section." But i cant find where i can update it to remove project 1 and include project 2.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

Yes, I know, that's why I told you that you have to change the rule's scope to multiple projects. This can be done from the global automation page and only a jira admin can do it. But you shouldn't remove any project. Just add project 2 next to project 1.

Matthew Hine May 23, 2023

@Alex Koxaras _Relational_  - my apologies, i must have missed that part. I have now updated to include both projects.

Edited - I have just checked if I create a new task on project 2, it copies the automation so raises a new task on project 2. I assumed it would do this given the automation is linked to the both projects. Is there anyway to stop this?  I only want to trigger the task on project 2 when a new task is created on project 1, but still want to keep it so that it quotes the project 2 reference on the email that is sent

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

@Matthew Hine you are indeed correct!

You have to add an if statement after the trigger and check that the project is indeed project 1. If not, then the rule should stop. So add a simple "Issue fields condition" that project field is equal to "Project 1".

Matthew Hine May 23, 2023

@Alex Koxaras _Relational_ Thanks again for your help and patience with this. As you may be able to tell its my first attempt at using the automation, so still trying to work everything out.

This is what it now looks like and seems to work as i'd hoped from the tests i have done. Does this look ok to you?

Capture.PNG

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

@Matthew Hine looks fine to me!

But test it thoroughly just to be sure. Two main concerns:

  • Email has to be sent to with the correct issue (new issue)
  • Rule has to exit if the transition takes place from any other project besides project 1 
Matthew Hine May 23, 2023

@Alex Koxaras _Relational_ Thanks again. I will keep on testing it to make sure before implementing. But the email does quote the correct issue key and when i have tried to create on project 2, it doesn't try and create a new task (like it did before i added in the condition)

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

Let me create the rule and get back to you

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

@Matthew Hine 

I've created the following rule, exactly like yours, and it works as expected:

create to new project.png

Project 1 = DSP

Project 2 = TRAIN

 

I transitioned the issue to in progress on my DSP project, and created a new TRAIN issue. The email was sent to me with the new issue key:

email received.png

Like Matthew Hine likes this
Matthew Hine May 24, 2023

@Alex Koxaras _Relational_ Thanks for taking the time to recreate and to confirm that it works.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events