How to detect if you are Creating or Commenting

 

if (relatedIssue==null) { print("creating"); } else { print('commenting on '+ relatedIssue.getKey()) }