I am looking for a way to have Jira Automation auto-comment on a work item, when it's transitioned to "Done", if it has at least one linked working item of the type "blocking".
Essentially, I want the user to be notified when they are trying to move forward a work item which has pre-conditions, based on the built-in "linked issue" functionality. So far, results have been touch and go with many false positives and negatives.
Here is my setup:

My needed automation logic:
IF
[Work item A] is transitioned to "Done"
AND
[Work item A] has a linked [work item B] blocking it (linked issue: "blocks")
AND
[Work item B] is NOT "Done"
Then
Comment on [Work item A] ("Attention!
This work item is blocked by another work item and should not be marked as "Done" until the blocking work item is completed first.")
The closest I got in way of answer to this was here:
https://community.atlassian.com/forums/Jira-questions/How-to-write-a-automation-rule-so-that-when-blocked-issue-is/qaq-p/2601468#U3228194
@Trudy Claspill apologies for resurrecting this, but this is the only place where I found a reference to what I am looking for, but lacking the practical next steps.
What you wrote there is exactly what I am trying to achieve:
"...If not, with an Automation rule you would be able to detect that Issue A was in a Done status while issue B was not, and you could get a notification about that"
It seems it should be quite simple to do, but I can't seem to find the proper way to make it work.
Any help is appreciated, thank you
Ubaroz