Forums

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

Can Project Automation be used to move Story to a certain status ?

Aisha M
Contributor
September 21, 2020

I have the below set of Epic workflow statuses, (All global status)

Backlog -> Analysis > Planning > Planned > Working > Delivered

So, when an Epic issue moves up from ' Working' to any other status above (like, Planned, Planning, Analysis, Backlog), all stories associated with the Epic, which is in 'Working' status should be moved to 'To-do', except for the Done stories.

How to achieve this ? Can Project automation be used ?

Thank you

2 answers

1 accepted

1 vote
Answer accepted
Callum Carlile _Automation Consultants_
Community Champion
September 22, 2020

Hi @Aisha M 

Yes this can be done using an automation rule (see below)

rule.PNG

So when a task is moved from WORKING > [any other status], IF said task is an epic issue type, then for all unresolved stories within that epic which are in a status of Working, they will be transitioned to To Do.

Hope this helps!

Aisha M
Contributor
September 22, 2020

Hi @Callum Carlile _Automation Consultants_  Thank you for the comment.

We have the below hierarchy, 

EPIC  > STORY

So, can this set up be used, if an EPIC is moved back from "Working" to any other above status, I want all the STORY that is in "Working" to go back to "TO DO"

Callum Carlile _Automation Consultants_
Community Champion
September 22, 2020

@Aisha M Yeah that's correct, I actually tested out this rule before posting and here's what it looks like:

Epic and 2 of it's stories are in status WORKING

Statuses1.PNG

After Epic is transitioned to something else (in this case, PLANNED), ONLY it's 2 stories in WORKING are transitioned to TO DO, all other stories/tasks remained unchanged:

statuses2.PNG

Aisha M
Contributor
September 24, 2020

@Callum Carlile _Automation Consultants_  Thank you so much ! This works amazing !

Callum Carlile _Automation Consultants_
Community Champion
September 24, 2020

@Aisha M No worries, happy to help! :)

Aisha M
Contributor
September 24, 2020

@Callum Carlile _Automation Consultants_ Just a random question regarding the JIRA project automation, why does the Project Automation always require the page to be refreshed in order to reflect the change ?

Example - When I move my Epic to an upstream status, the associated Story that is displaying on the Epic page doesn't show the change right away . I'll have to refresh the page & then the Story on the Epic page reflects the change . . .  Very weird

0 votes
Aisha M
Contributor
October 7, 2020

@Antoine Berry Hi :) Do you think this can be achieved using the workflow ? The automation seems to happen with a lag . . . 

All the workflow transitions are global, so dunno where & what to add to the workflow for this requirement . .  But we have below validator as below for checking a field when an Epic moves up from working.. Should something like below or a post function be used ?

eg,

def LastTransitionBean = changeHistoryManager.getChangeItemsForField(issue, "status").getAt(changeHistoryManager.getChangeItemsForField(issue, "status").size() - 1);
String LastTransitionFrom = LastTransitionBean.getFromString();
String LastTransitionTo = LastTransitionBean.getToString();
log.debug("LastTransitionFrom :${LastTransitionFrom} LastTransitionTo :${LastTransitionTo}")
log.debug("Last Transition Action :${LastTransitionTo}")
log.debug("Current Transition Action : ${actionName}")

if(LastTransitionTo == "Ready & Planned" || LastTransitionTo == "Working")
{
//Check for field-

Aisha M
Contributor
October 8, 2020

@Antoine Berry  LOL, I think you accepted my above comment as answer by mistake :D

Antoine Berry
Community Champion
October 9, 2020

Hi @Aisha M Are you sure it was me ? This is the first time I open this question :o

Anyway yes this is probably possible with a script. To be honest the above solution with automation seems just fine. Either way the "visual" of the status is not refreshed automatically. Automation or scriptrunner, you will have to refresh the page to see the new status. 

And this requirement is probably more suited to an automation.

Aisha M
Contributor
October 9, 2020

@Antoine Berry  Anyway, I got a fake "accepted answer" badge for it :D:D:P

Yes, I know . .  This is soo simple & easy . .  But for some reason they want everything on the workflow ! And, since all the Epic workflow transitions are global transitions . .  Really confused what kind of a post function to add to ensure the stories of the Epic which are only in "Working" are moved back to To - do .

Arrgh, just 3 more weeks before I go away from work :o

Like Antoine Berry likes this
Antoine Berry
Community Champion
October 9, 2020

Hehe, you are on your path to becoming a community leader now ! :)

So is your requirement fulfilled by automation ? If that is the case I would choose this solution, it is graphic (easier to maintain) and accessible while with scriptrunner you would need to add multiple script post functions...

Aisha M
Contributor
October 9, 2020

@Antoine Berry Yea right ! I hope  they dun disable my account for posting wayyy too much questions & comments :P

No, they are looking at using either Scriptrunner or some JWME thingy . . . I was told its simply adding a post function with a script . . . 

Like Antoine Berry likes this
Antoine Berry
Community Champion
October 9, 2020

On the contrary, you are an active member of the community and Atlassian loves that.

Now do you own automation ? If that is the case, I would really favour this solution. This app is owned by Atlassian. It is graphic, therefore easier for other users and those who will follow you to grasp and understand what this rule is doing.

Like Aisha M likes this
Aisha M
Contributor
October 9, 2020

@Antoine Berry haha, I hope they give out badges for folks who log in everyday :P 

I think we do have automation . . .  But the thing is, from a very longgg ago (say4 yrs ago) everything process the team has was carried using workflow conditions & validators (using Scriptrunner & JWME) . so, they wanna keep that as a standard & not have processes done using every plugin  . . .  So everything is required to be done using workflows instead of other plugins 99% of the time  . . . :(

Antoine Berry
Community Champion
October 9, 2020

Well, type G+G and go to "Manage apps". There you will see if you have automation (check the license too). I would say automation is pretty standard since it is Atlassian owned.

But if this is mandatory to have scripts, I can give it a try in another question. :)

Aisha M
Contributor
October 11, 2020

@Antoine Berry I'll rather create a new question :P I actually had one , but Nic had commented on that . .  So, I ll create a new "new" one for you ! :D

Aisha M
Contributor
October 14, 2020

@Antoine Berry  I finally convinced everyone to stick to Automation :D:D 

Antoine Berry
Community Champion
October 21, 2020

Hi @Aisha M , 

I think that is a good idea. You do not need my help anymore then ?

Aisha M
Contributor
October 21, 2020

@Antoine Berry Hello !!! I wont be needing it, but if you have want to give a try just out of interest/curiosity , I d be more than happy to mark your answer for the question :):)  thank you so much for willing to help earlier ;(

Antoine Berry
Community Champion
October 21, 2020

You are welcome ! Maybe I will take a look later, but at the moment I am overloaded and have to finish a project, cannot wait to be done with it...

Aisha M
Contributor
October 21, 2020

@Antoine Berry  Ah, that's bad :) Don't worry, you ll get through . . . . We usually don't have work close to the holiday season . . .  Anyhoo, I''ll be done with work in a few days ! *yay*

Antoine Berry
Community Champion
October 21, 2020

Nice, enjoy these weeks off, much deserved after all these Jira accomplishments :)

Aisha M
Contributor
October 21, 2020

@Antoine Berry Yer too humble ! Thanks to you for  helping me finish all these JIRA requirements, God, I have no idea why I'm even in development :D:D Should change my track soon :)

Like Antoine Berry likes this

Suggest an answer

Log in or Sign up to answer