I have a global rule that I created whereby it captures comments from a ticket in one project and copies it over to its linked issue in another project and vice versa. However for some reason it does not consistently work and I cannot figure out why. Any help would be appreciated. Here are the rule details:
My scope is set to multiple projects with Actor as JIRA Robot.
When: Issue commented: Rule is run when a comment is added to an issue.
If: Compare two values
Checks if:
{{issue.comments.last.author.name}} does not equal jirabot
For Linked issues
Types: All link types
If: Compare two values
Checks if:
{{issue.comments.last.author.name}} does not equal jirabot
Then: Add comment to issue
{{triggerIssue.comment.last.body}}
If we are talking about Automation for Jira, you could check the audit log of the rule to check what happened to it when it ran (if).
In any case I suppose that you are trying to prevent endless comment loop by checking for the last author name in all issues, i.e. checking that source and target issues' last comment author is not the jirabot. So unless both issues receive a comment from another user than jirabot, this rule cannot work. Can that be the reason?
Maybe you could switch that to compare the comment body, which should prevent duplicates and at the same time not require that both issues require a comment from another user.
Other than that, I would say you might want to elaborate what "works inconsistently" means -- it could mean virtually anything to leave us guessing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Appreciate the quick response. I'll review the audit log as suggested. That said, I do believe its a case of the comment coming from someone other than jirabot as you mentioned. I entered 2 comments myself and one appeared as Jirabot and the other as myself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.