Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

# 60 on the Q&A list

Alexis Gutierrez October 28, 2022

I was reading the 79 Q&A list, I was wondering if automation is possible for an issue to be created by a specific phrase in the comment section of the original issue. Example: Issue - 1 is installed based but might need a SW follow up. I would like to add comment to issue to "Create issue/task on GO board for SW follow up" and it will create a new issue on a different project board. Is that possible?

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
October 28, 2022

I don't know about the list you are referencing, but it is possible to create an automation rule that would handle that case. 

There is a trigger for Issue Commented.

You would need to follow that with a Condition to see if the text matches your expectations. You would probably need to use the Advanced Compare option.

If it does then you would follow that with an Action to Create Issue.

Your rule Actor would need to have appropriate permissions to see the issue where the comment is added and create issues in the destination project.

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 28, 2022
Like Trudy Claspill likes this
Alexis Gutierrez October 31, 2022

I tried advanced compare option but that didn't work, not sure if there is a smart value that would work with 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 31, 2022

Alexis, would you please post images of your rule and the audit log details?  Those may provide some context for suggestions.  Thanks!

Alexis Gutierrez October 31, 2022

This is what it tells me about this rule..

Capture1.PNG

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 31, 2022

Thanks for that information.  Perhaps try this in your advanced compare condition:

  • first value: {{issue.comments.last.body.toLowerCase().match(".*(move to go board).*")}}
  • condition: does not equal
  • second value: leave this value empty

How this works:

  • get the last comment's body
  • convert it to lower case
  • use the match() function with a regular expression to find your text, returning 0-to-many matchs
  • and test if any were returned...if so, continue processing
Alexis Gutierrez October 31, 2022

Close.. it looks like the first part of the rule worked just not the end.

Capture2.PNG

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 31, 2022

That error indicates an issue type mismatch: between the source/trigger issue's project and the target project, Gaming Operations Board

Three of the possible causes of that are...

  • if both source and target project are company-managed projects (CMP), the issue type of the trigger issue does not exist in the target project.  Fix: ensure the type is available in both, or select a different type for the target rather than copy from trigger issue.
  • if both source and target project are team-managed projects (TMP), the added issue types are different.  Fix: explicitly select the issue type for the target project rather than copy from trigger issue.
  • if the projects are of different types, CMP and TMP, the types will not match.  Fix: explicitly select the issue type for the target rather than copy from trigger issue.
Alexis Gutierrez October 31, 2022

fixed and now it works great! thank you!!

Like Bill Sheboy likes this
Alexis Gutierrez November 1, 2022

@Bill Sheboy It looks like everything works but the comments.. Not sure why the comments are not moving over. All the attachments are and other things. I have it checked to move over from the issue.

Capture3.PNG

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.
November 1, 2022

Would you please post an image of the audit log details, showing an example where the rule triggered and the comments did not copy from the trigger issue?  Thanks!

Alexis Gutierrez November 1, 2022

sure. Here it is below.

Capture4.PNG

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.
November 1, 2022

Thanks!  That appears to be a custom field, and not the built in comment field.  I just confirmed that the built-in comments field cannot be copied directly (as you have shown) with an automation rule.

The only work-around I am aware of is to try to add the comments with JSON from the trigger issue, under advanced edit.  There appear to be some open defects/suggestions indicating this may not be possible, but perhaps give it a try.

Alexis Gutierrez November 7, 2022

Hi Bill, after looking around the setting and talking with my manager. We believe that this is not a comment box. We think this is the activity area, so comments can be posted. Is there anyway to move over the activity area?

Thank you,

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.
November 7, 2022

I am unclear what you mean, as the Comments are shown in the Activity area:

Capture.PNG

Do you mean in another field/region of the issue view, perhaps from an addon app?

Alexis Gutierrez November 7, 2022

I was wondering if I could have the whole Activity field be copied over? I know there was no a real way to have the comments moved over with the tickets but maybe the whole activity field?

Thank you,

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.
November 7, 2022

Short answer: no.

That activity area is listing multiple things: comments added, the history (i.e. issue changelog), and work log (i.e. time entry for the issue)

You can access the comments and work log entries from an issue in a rule.  But the change log entries are created for each issue change, and so happen one at a time.  A work-around would be to call the REST API for the change log to grab the entire list of them (up to a chunk of 50 as the API method limits the returned values).

Suggest an answer

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

Atlassian Community Events