Question

How do I get the last comment on a Jira Issue?


I found suggestions to use the loop and filter features to get the last comment from the jira comments body field, but the tab delimiter in the loop is a comma.  This throws off things where there is a comma in the comments. Is there ever going to be a workaround put in place so that we can get the comment data with a more ‘unique’ delimiter?  Or a way to get just the last comment on an issue?


5 replies

Userlevel 7
Badge +14

Hi @Jonathan Turner 

Can you link to the related suggestions you mentioned for context?

You may need to convert the line items to be pipe delimited using a Formatter > Utilities > Line Items to Text

Then you can use the Looping Create Loop from Text using the pipe delimiter.

 

 

This is the article I was referencing: 

 

Userlevel 7
Badge +11

Hi @Jonathan Turner 👋

I expect the comments are already returned from the Jira trigger as line items, is that correct?

If so, you could use the Create Loop From Line Items (Looping by Zapier) action and map the relevant comment fields. That way you wouldn’t need to set a delimiter like you do when using the Create Loop from Text action event. Instead it would just loop through for each comment (line item). From there you can use the same workaround of using a Filter to only allow the Zap to continue for the last comment.

Can you give that a try and let us know if that works any better?

I tried the ‘Create Loop from Line Items’ and the outcome is the same. Jira comments are not pulled into Zapier as Line Items.  They are pulled into a text area field with all the comments separated with commas.

Userlevel 7
Badge +11

Sorry to hear that didn’t work as hoped @Jonathan Turner.

Can you share some screenshots showing the current set up of the Zap?

In particular I’d like to see screenshots showing the fields and settings selected for the Looping action as well as the action that should be have the last comment selected but is outputting a comma separated list of comments. This will help us to determine whether there’s anything on the set up there that might be preventing the last comment from being added to the text area field as expected. Please remove/hide any private information (like names, emails, addresses etc.) from any screenshots before sharing.

Thanks, I look forward to your reply! 

Reply