Once an issue is created I want to automatically add it to the current Sprint?

Sarah Isaacs February 21, 2024

Hi 

I am creating a books Jira board.

Once an Epic is created in the timeline i.e. a book, I create an issue - writing and then a subtask of storyboard etc.

As part of this initial automation, which is a manual trigger by the creator of the epic (book). 

It creates the writing issue and then the sub task. I also want to move the issue to the current sprint, but I can't add an edit issue field as there is no option for sprint. Why would there not be an option for sprint? So I thought can I write it in a smart value?

Any help would be really appreciated.

Thank you

3 answers

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2024

@Sarah Isaacs 

Are you just scrolling through the list of fields, or have you tried typing "sprint" into the search field at the top of the list?

Screenshot 2024-02-21 at 10.53.25 AM.png

Sarah Isaacs February 21, 2024

Well the good news is I found the Active sprint Field as you suggested thank you. However my automation isn't working and I'm not sure why? Any suggestions would be gratefully received. The idea is that the user enters all the fields info on who is working on the book in the epic and then this is copied into the issue. Also it move the issue straight into the sprint and so onto the board into the to do column. A subtask is also created for the first user the PO to kick off the book. Thank youimage.pngimage.pngimage.pngimage.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2024

I don't think "Active Sprint" is the correct field. The field noting the sprint(s) to which an issue has been assigned is named just "Sprint".

Screenshot 2024-02-21 at 12.06.21 PM.png

"Active Sprint" is not a field provided by Jira. It must be a custom field that some administrator added to your instance for unknown reasons.

 

If you had the right field your choices for setting it would look something like this:

Screenshot 2024-02-21 at 12.08.26 PM.png

You would be able to select "Active Sprint" or "Next Sprint" from any one of the Scrum boards where the board scope includes the project in scope for this rule.

 

Also, at the point you are executing the Edit action, the issue that is in scope is the Trigger Issue, not the newly created issue. Is that your intention - to edit the Trigger issue at that point? Any fields that you want to set in the newly created issue (the "Writing" issue) should be set within the Create Issue action. There shouldn't be a need for a separate Edit Issue action.

Sarah Isaacs February 22, 2024

Hey @Trudy Claspill  I don't have an edit issue/fields option for sprint. There just isn't one there? I don't understand why and how to fix it. Any light you can shed on this would be so helpful thank you.

 

I basically want the user to create the epic, add epic name and then fill out the fields I have created (content Writer etc) and then run a manual trigger which creates a card(issue) within the current sprint, has the name of the epic along with the title writing card 1, populates the same fields (content writer etc) on the card with the names that they selected when making the epic. Then also creates the first sub task kick off. 

 

I have some of it working but not the fields populated or creating the card(issue) in the current sprint. I can't seem to get that right? Any thing you can do to help would be amazing as I'm still learning and so keep reading as much as I can. thank you so much

Sarah Isaacs February 22, 2024

Update: @Trudy Claspill I now have fixed the fields to copy from the parent. But the sprint is still a mystery. I have checked both issue types epic and writing both have sprint as an active field. Which isn't coming up in the choose fields cog in the edit issue automation. I don't understand why. Thank you

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2024

Hello @Sarah Isaacs 

With what type of project are you working? Get that information from the Type column for your project's entry on the View all projects page found under the Projects menu.

When you look at the Rule Details page for this rule, what does it show for Scope and Projects?

For the project(s) in scope for this filter, are the projects also within the scope of a Scrum board? Through the UI are you able to interact with these issues on a Scrum board?

When you are in the Fields selection pull-down, what do you get as possible fields when you type in spr?

 

Let us confirm that I understand your process.

1. Through the Jira UI you create an Epic type issue.

2. You manually trigger the Automation

3. You want the automation to

3a. create a child issue of type "Writing" in the Epic

3b. copy some data to "Writing" from the parent Epic

3c. add the "Writing" issue to the currently active? (or next planned?) sprint

3d. add a child subtask to the new "Writing" issue

 

Let me know if that is correct.

 

Also, if you have made any changes to the rule (i.e. eliminated the Edit Issue action and just set the fields in the Create Issue action), please provide new screen images showing the current version of the rule.

 

Sarah Isaacs February 23, 2024

Morning @Trudy Claspill 

 

The Type is Team-managed software.image.png

 

Rules - so I'm hoping you mean if I go into the automations:

image.png

The project I created was a software project. A scrum board and team managed.

 

For both my epic and writing issue type (a task renamed) I get this:

image.png

Let us confirm that I understand your process.

1. Through the Jira UI you create an Epic type issue. - Yes in the timeline the user does this.

2. You manually trigger the Automation- Yes, The user once the epic has been set up triggers this.

3. You want the automation to

3a. create a child issue of type "Writing" in the Epic - yes

3b. copy some data to "Writing" from the parent Epic - yes the epics name and the fields (content writer, designer etc) that the user should have populated when the epic was created.

3c. add the "Writing" issue to the currently active? (or next planned?) sprint - yes the current sprint always. 

3d. add a child subtask to the new "Writing" issue - yes the first step of the book.

I also what to assign the writing issue the user that is in the content writer field.

 

I have some of it working, just not the sprint or the assignee from the field.

 

image.png

 

 

I'm trying very hard to teach myself all of this and some of it I just don't get so I apologise. I really appreciate your help and explanations. Thanks so much

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2024

1. Immediately after the trigger I advise you to add a condition to check the issue type of the trigger issue and ensure that it is a "book" (or whatever name you are using for that issue". Manual automation rules can be triggered from any issue type, and this could fail if triggered from. other issue types.

2. The first Edit Issue Fields action that is editing just Assignee is placed such that the trigger issue (the Epic) is currently in context, and that action will be trying to change the assignee on the Epic. Is that your intention?

3. The second Edit Issue Fields within the branch is positioned such that it will be applied to the newly created issue. Is that your intention? If so, you should be able to set all those fields within the Create Issue action where you are creating the new Writing issue.

4. You want to set Assignee for the Writing issue to the value in "Content Writer". Is that a User Picker field? Is that field only defined in the Book/Epic issue? Or do you also have the Content Writer field in the Writing issue and copy the value from the Book/Epic?

5. For the Branch you don't need to use JQL. You can use Most Recently Created Issue.

Screenshot 2024-02-23 at 10.30.55 AM.png

 

6. If you are in the Create Issue action where you are creating the Writing issue and you try to find the Sprint field, what do you see? This is what I see in my system.

Screenshot 2024-02-23 at 10.35.59 AM.png

 

Sarah Isaacs February 25, 2024

Hi @Trudy Claspill 

Thanks for your reply.

 

I have now added in the issue type = Epic - As you suggested. And removed the JQL etc. Much better thank you.

I'd like the Epic to be the place that holds the names of the assignee's (the writer, the PO, the Lead editor, the designer, the illustrator).

Therefore I set up a fields that are people fields and sit in the context fields section of the issue type:

image.png

 

See the one that is called "Content Writer New".

I have these fields on both the Epic issue type and the writing Issue type.

So when I create both a task and then a Sub Task I'd like to Assign that to the Value(person) in the Content Writer Field. 

The content writer stays the assignee on the task, Until all the sub tasks are completed within that task.

Then some of the sub tasks will be assigned to a person in one of the other fields that is held in the Epic. For example the PO signs off the work the writer has completed and so that sub tasks would be assigned to the PO.  Some of the Sub tasks will be completed by the content writer and so they would be assigned to that person.

Is this possible?

I have tried to add the assignee within the create a new issue action. Using a smart value {{issue.epic.[Content Writer New]}}?

And then put the same in the create sub task action.

I've had no success.

Then as for the Sprint. 

image.png

 

I just don't get the sprint option.

I just don't understand it? 

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 28, 2024

With regard to setting the Assignee in the issue you are creating to the value from the "Content Writer New" field that is in that issue's parent:

Trying to use a smart value:

- Please show us the details of that portion of the Create New action, showing the actual smart value you are trying to use in that field.

If this is literally the smart value you were trying to use...

{{issue.epic.[Content Writer New]}}

...then it doesn't work in part because the syntax is not correct.

{{issue}} is referring to the issue currently "in focus" at that point in the rule. If you are in the Create Issue action for the Writing issue, {{issue}} refers to the issue that triggered the rule (the Epic). The Writing issue doesn't exist yet because the Create Issue action has not completed. 

Also, you don't use square brackets around field names in smart values.

So, in the Create Issue action for the Writing issue, to set the Assignee field to the value in the Content Writer New field from the trigger issue (the Epic), the smart values you can use are any of the following:

{{issue.Content Writer New}}

{{triggerIssue.Content Writer New}}

 

Now, when you get to creating the Sub-task, the issue that is currently "in focus" has changed. You have started a branch "For most recently created issue". Within that branch {{issue}} will be referring to the most recently created issue.

If you want to set the Assignee on the Sub-task to the value in the Content Writer New field from the Epic that triggered this rule, then you can use the smart value:

{{triggerIssue.Content Writer New}}

{{triggerIssue}} will always refer to the issue that triggered the rule, regardless of where you are in the rule.

{{issue}} can refer to differ issues, depending on where you are in the rule.

 

An alternate method instead of using a smart value

Another method you can use to set a value in an issue you are creating is to copy that value from another issue within the rule.

Click the ... button next to the Assignee field and select Copy.

Screenshot 2024-02-28 at 6.27.30 PM.png

 

That will change the field to look something like this:

Screenshot 2024-02-28 at 6.30.12 PM.png

 

Click anywhere on that text that says "Copy Assignee from Current Issue" and you'll get a pop-up like this:

Screenshot 2024-02-28 at 6.31.23 PM.png

In this pop-up you can select which issue and which field you want to copy from. In your case you want to change the issue to Trigger Issue, and the field to Content Writer New.

Screenshot 2024-02-28 at 6.32.47 PM.png

 

I wouldn't choose either Parent or Epic in this case because you are trying to set this field while in a Create Issue action and that action has not been completed. So at this point the rule doesn't really have a reference for who the new issue's Parent or Epic is.

---------------------

 

In the Create Issue action where you are searching for the Sprint field...

Screenshot 2024-02-28 at 6.14.07 PM.png

 

The scroll bar indicates there are many more fields that include "spr" in their names, and notice they are listed in alphabetical order. Try typing in sprint to filter the list more, and then use the scroll bar to look at all the entries in the list, seeing if Sprint appears in the list in the appropriate place in alphabetical ordering.

0 votes
Sarah Isaacs February 21, 2024

image.pngimage.pngimage.pngimage.png

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2024

Hmm. I am not sure if this is project configuration set up or what.

Maybe SME's like @Trudy Claspill can shed some light when they see this post..

Sarah Isaacs February 21, 2024

Thank you Kalyan, That's what I wondered too. I'm still quite new to Jira so I wasn't sure if there is another way to do it?

0 votes
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2024

Hello @Sarah Isaacs 

Please share screenshots of your rule. I see "Sprint" field available to add during issue creation and also during edit screen in the drop down... 

 

image.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events