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

Transition post-function for a Sub-Task

We have a requirement where a sub-task of current issue should be transitioned. If a new sub-task is opened in the current issue with same EmpID, we want to close/transition the existing sub-task with same EmpID. We tried few JMWE post-funtions with no luck. We currently have JMWE, JSU and Project automation available. Any help with this issue will be highly appreciated.

2 answers

1 accepted

1 vote
Answer accepted

Hi @Sadath Ali Syed 

you can achieve this using JMWE. On the Create transition of your sub-task workflow, you should add a Transition Related Issues post-function, configured as follows:

  • Transition(s): the Close transition to trigger on the other sub-task
  • Target Issue(s): "Issues returned by the following Groovy script:"
  • Groovy Script:
issue.parentObject?.subTaskObjects?.findAll{issue != it && it.get("EmpID") == issue.get("EmpID")}

Hello @Sadath Ali Syed 

What is "EmpID"? Is that a custom field? If so, what type of field is it?

I think it might be possible to do this with Automation, but to work out the details I need to know what EmpID is.

@Trudy Claspill EmpID is a custom field of type 'Text Field (single line)'

What type of data is entered in the field? Are spaces or non-alphanumeric characters ever included?

What version of Jira are you using and what version of Automation?

I work with Jira Cloud. I might be able to work out a solution in Automation there, but that doesn't guarantee that the same functionality would be supported on Jira Server Automation

EmpIDs entered are alpha-numeric. Most of them enters it as abc123. However, few enter them as abc 123 (with space). We dont have validators/restrictions in place. Our Jira version is 8.13 server. Version of Automation for Jira is 7.3.3.

How sophisticated do you expect the EmpID matching to be? Would you try to implement something that would consider "abc123" and "abc 123" to be a match? You might want to consider adding some validation to that field so that you are more likely to get conclusive matches.

@Trudy Claspill - Thanks for your time. The solution David provided worked out for us.

Suggest an answer

Log in or Sign up to answer
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...

196 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