Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation HELP! Custom Fields editing Parent

Heres the gist. We have a custom field for stories/sub-tasks called "migration blocker" (yes, no). We also have a dashboard showing all Stories, required for migration by sprint.

We're running into issues where a story will have 5 subtasks on it. 4 of which are required for migration, one is not. So I'd like to automate that when the 4 marked ("required for Migration" = yes) are done, the custom field on the Parent story changes "required for migration" to no, thus taking it off my dashboard.

From the start the story needs to show it's required for migration, as 4 of the 5 subtasks are, but once that's completed we no longer need to track it towards this specific deadline.

I made this automation, but I don't think it will work after looking at it because I need ALL subtasks marked 'Yes' to be done as well as if there are say, only 2 subtasks but neither are required for migration to automatically changes the story's custom field to "no".

 

Screen Shot 2020-08-07 at 7.53.37 AM.png

3 answers

3 accepted

1 vote
Answer accepted

Hi @Casey_Jones  -- Welcome to the Atlassian Community!

If I understand you correctly, the workflow of your use case is:

  • When an issue moves to Done
  • And the issue is a sub-task
  • Get the parent info (maybe with the temp variable feature)
  • For the sibling sub-tasks
    • Are they all done?
      • If so, make the parent's migration "no"

Is this what you are describing?  

I wonder about your edge case of 2 sub-tasks that were never set to migration "yes".  Why would the parent's migration be "yes" for those?

 

Best regards,

Bill

There is no default setting, so the story wouldn't be set to 'yes' or 'no'. But if all subtasks are not required, ' I would like the story to be set to 'No' so it get's pulled out of the dashboard.

Unfortunately I'm not allowed to make it a required field. 

1 vote
Answer accepted
John Funk Community Leader Aug 07, 2020

Hi Casey - Welcome to the Atlassian Community!

I think I would probably trigger it off of any sub-task that moves to Done that has a value of Yes for the Migration Blocker. 

Then take a look at the first use case in this article to see how to check on the parent and update it:

https://www.atlassian.com/software/jira/guides/expand-jira/automation-use-cases

Take a swing and that and post back what you come up with.  :-)

1 vote
Answer accepted

Hi @Casey_Jones 

If I've understood your need correctly:

  • Five Sub-tasks are created - 4 Yes, 1 No
  • When the 4 Yes Sub-tasks move to "Done"...
  • Change the field value on the parent from Yes > No

If so, this is how I did it:

  1. Trigger: Issue Transitioned = Done
  2. Add a Branch: Set "Type of related issues" to Parent
  3. Add a Condition: Related Issues Condition - set "Related issues" to sub-tasks, Condition "None match specified JQL", and JQL to status != Done and "Required for Migration" = Yes
  4. Add an Action: Edit Issue - Choose to set the "Required for Migration" field to "No"
  5. Give it a name and publish it

^ The Condition checks each time a sub-task is moved to Done to see if there are any other issues which aren't in Done which still require migration. Using "None match" ensures absolutes against the 4/5 - as opposed to "some" or "all".

Let us know if this works for you!

Ste

Would this work if the 5th subtask (the one not required for migration) is not done?

Shouldn't I add after the trigger, If issue type equals sub-task?

otherwise wouldn't it run if the story is done? 

My dashboard is set up for all stories != done as at a higher level we're only tracking current WIP.

Hi @Casey_Jones 

Yes it would still work regardless if the other sub-task is open or closed.

The branch "Parent" is based on sub-tasks - so it assumes the trigger issue was one. There is a separate branch option for Epic - "Epic (Parent)"

This means closing the story would not trigger an action, even though the trigger requirement is met and it might show up in the audit.

To make it a little cleaner, you could add in the additional condition - so the rule would be:

  1. Trigger: Issue Transitioned = Done
  2. Condition: Issue Fields Condition - set "Field" to Issue Type, "Condition" to equals and "Value" to Sub-task
  3. Add a Branch: Set "Type of related issues" to Parent
  4. Add a Condition: Related Issues Condition - set "Related issues" to sub-tasks, Condition "None match specified JQL", and JQL to status != Done and "Required for Migration" = Yes
  5. Add an Action: Edit Issue - Choose to set the "Required for Migration" field to "No"
  6. Give it a name and publish it

Ste

Like John Funk likes this
Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

167 views 6 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you