Enforce Parent field not to be empty on status transition rule

Carles Capellas October 10, 2024

In a team-managed project, we are using Rules in the workflow transitions to validate that some fields have been populated when moving tickets to a certain status:

Screenshot 2024-10-10 at 16.32.01.png

 

The rule works as expected for a custom text field (i.e. Release notes title), but it incorrectly prevents transitions for tickets that actually have a Parent. What am I missing?

3 answers

2 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.
October 15, 2024

Hi @Carles Capellas -- Welcome to the Atlassian Community!

First thing, the Parent field is definitely used in team-managed projects.  That is how issues-to-subtasks and epics-to-child issues are linked.

Next, there is a known problem for team-managed projects where the workflow validator cannot consistently detect empty / null fields on a transition: https://jira.atlassian.com/browse/JSWCLOUD-26434  There are a couple of workaround noted in that suggestion.

Kind regards,
Bill

Carles Capellas October 16, 2024

Thanks @Bill Sheboy! Happy to know I'm not the only one having this problem.

I had a look at the workarounds and, unfortunately, they won't do it for us. On one hand, the Parent field can't be marked as required:

Screenshot 2024-10-16 at 09.02.20.png

On the other hand, we need to accept several values for the Parent field; using the Restrict to when an issue is a specific value with a specific value wouldn't allow us to assign issues to different parents.

We have come up with a third workaround: adding an automation rule to copy the parent ticket ID to a custom text field, every time the Parent field is edited. We then use that custom text field in the workflow transition rules. Not pretty, but it does the trick!

Like Bill Sheboy likes this
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.
October 16, 2024

Well done on that workaround!

Another automation approach for such scenarios is more an after-the-fact thing:

  • remove the workflow validator on the field
  • create a rule triggered on issue transitioned
  • detect the empty field with a condition
  • send a notification / mention to the {{initiator}}
  • transition the issue back to where it was
0 votes
Marc - Devoteam
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.
October 10, 2024

Hi @Carles Capellas 

Team managed projects don't actually use the parent field.

parent - child relation is not based on the parent field. You can also not set the parent field in team managed projects.

Child on epics a created in Epic issues or by dragging and dropping issues on an Epic in a backlog.

As @John Funk mentions, team managed seems easy to use, but has so many limitations in relation to company managed.

Carles Capellas October 10, 2024

Hi @Marc - Devoteam and thanks for chipping in as well.

We do have a Parent "System field" in our team-managed issue types:

Screenshot 2024-10-10 at 18.10.39.png

We are using it on both Stories and Bugs. We get automatic suggestions for Epic tickets when populating it and we see the parent ticket on the card layout in the project board:

Screenshot 2024-10-10 at 18.15.09.pngScreenshot 2024-10-10 at 18.15.31.png

Based on the field icon, I understand that the Parent field is a URL field. Maybe those are not supported on workflow transition rules?

As a workaround, we are planning to add an automation rule to copy the parent ticket title/ID to a custom text field, every time the Parent field is edited. We would then use that custom text field in the workflow transition rules. Any better ideas will be very much appreciated 🙌

Marc - Devoteam
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.
October 10, 2024

Hi @Carles Capellas 

I have a dummy team managed project and linking parent child issues can be done without adding the parent field.

So my assumptions is, just like story point estimate field is used in team managed and story point in company managed, that the usage in behaviours in workflow, automations, etc.. is different.

Thats why I dislike team managed projects they are nice for team with no major custom modification requirements.

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2024

HI Carles - Welcome to the Atlassian Community!

I am not a fan of Team-managed projects for problems like this that pop up. You might try removing the custom field and just try it with the Parent field and see if it works. 

Carles Capellas October 10, 2024

Hi John, and thanks for the fast reply 😄 I've tried what you suggest (a rule with a single Parent field), but the same behaviour persists.

Incidentally, we are currently moving away from a company-managed project, as it grew too complex and no one in the company understands it anymore. We are a small team, and I feel that a team-managed project should be sufficient for our needs.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2024

Fair enough - but you will lose a LOT of functionality - just like with this.  :-)

 

Like Marc - Devoteam likes this

Suggest an answer

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

Atlassian Community Events