Forums

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

Automation - auto create Tasks based on the Field Value

Lina September 6, 2021

Is it possible to have tasks automatically created when creating an epic and a special field value? 

Tasks should be created based on the value of the field "Medium" and each stored medium requires its own tasks 

3 answers

1 vote
Fabian Lim
Community Champion
September 6, 2021

Hi @Lina

Yes it is possible with jira automation. Example:

Trigger: issue created

Condition: jql condition: issuetype = epic and priority = medium

Action: create issues and edit the epic link to the newly created ticket so that they are linked.

Examples: https://www.atlassian.com/software/jira/automation-template-library/rules#/

Regards

Lina September 7, 2021

I guess I expressed myself wrong. I didn't mean the medium priority, I meant some type of media. So a selection within an epic.

Fabian Lim
Community Champion
September 7, 2021

@Lina

I just put that as an example, you put whatever customfield you need in the JQL.

0 votes
Eran Nir
Contributor
July 30, 2023

Hi @Fabian Lim @Bill Sheboy 

When moving a Story (issue type) ticket to Done status, I have a popup window opens.  
I would like to add to this window 2 questions like:
*Is it A? (Yes/No)
*Is it B? (Yes/No)

If one of the questions is answered with Yes and “Done” (the window's button) is clicked, then I need:


  • 2 new tasks (issue type= Task) should be automatically created and attached to this origin Story (ticket)

  • Tasks name should be the lifter name

  • The question text (e.g "Is it A?") that was answered Yes, should be in the description or any other field in the task

  • One of the tasks should be set with the label (Label field) “Security” assigned to a specific user.

  • The second task should be set with the label (Label field) “Privacy” assigned other specific user

Note: if both questions are answered Yes, then 4 tickets should be created (2 for each).
1. Which fields should I use for the Window's questions?
2. Can these functionalities be supported? and how?

Due to the fact we are using A4J on the lite version should it work?

0 votes
Bill Sheboy
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.
September 7, 2021

Hi @Lina -- Welcome to the Atlassian Community!

Yes, and...to what @Fabian Lim suggests:

If you have a known number of tasks to create, you could include each one in the rule.  If instead the number of tasks to create is dynamic (e.g. zero to many) based upon your Media field, you could try to use Advanced Branching and list functions in a rule to iterate through them.  Please look here for documentation on that approach: https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935

You do not note if the Media field is a multiple-select option field or text with delimiters...let's assume it is text separated by commas.  The resulting rule would look something like this:

  • trigger: issue created
  • condition: issue type is epic
  • condition: media field is not empty
  • advanced branch: using the media field, split into a list  {{issue.media.split(",")}}
    • action: create a task and link it to the epic

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events