Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,025
Community Members
 
Community Events
176
Community Groups

Automation for Jira -adding logic for attachments

I have a Jira Service Management project created, and I use a linked software project to track development. With that, I copy all of the field values from the JSM issue to the linked Jira software issue using automation for jira.

Problem Statement:

An issue that I am encountering is that our JSM customers are coming back in to the JSM issue (through the portal) and adding Attachments after the initial ticket creation. The attachments are missed because they are not carried forward to the linked Jira software issue.

Solutioning:

I have looked into adding an automation to monitor for field changes in the attachments but automation for Jira does not seem to support monitoring attachment changes from the portal side (i.e. the customer is coming to the jsm portal, locating the issue, and adding the attachment through the portal). It seems to only support monitoring attachment field changes from the agent side of the issue.

Is there a different approach that anyone can recommend?

 

As an alternative, I proposed adding a comment to the linked software issue that alerts specific users when a comment is added. I feel like the rule I currently have has some room for errors because the user could create an issue that includes an attachment, then come back in later and leave a comment and the rule would still trigger.

Are there any recommendations anyone would have to improve the rule logic?

jsm.png

 

Thanks in advance!

1 answer

1 accepted

1 vote
Answer accepted
Rachel Wright Community Leader Dec 29, 2022

Hi @Adrienne McCoy ,

First, let me say WOW! What an AMAZING description of the problem details. You must be a developer or tester! ;) Thanks for all those great details.

I wasn't able to get the attachment automation to work like described above either so it's time to get creative. I have an alternate idea for you to try!

How about instead of trying to copy the file over, you just copy the list of files and the date/time they were added? I know this isn't perfect (because the developer has to click over to the support ticket to see the actual attachments) but if you look at it from Jira's perspective, you'd avoid storing two copies of the same image, which might eventually eat up storage space.

I got a crude example working using the following smart tags code:

-----<START>-----

New comment added by: {{comment.author.displayName}}

Attachments in {{Issue.key}}

{{#Issue.attachment}}
* {{filename}} - Added {{created.shortDateTime}} by {{author.displayName}}
{{/}}

-----<END>-----

Here's what the simple example rule looks like in Jira automation.

attachment-monitor2.png

Note: I've unchecked the "Prevent duplicates by only adding this comment once to a particular issue." box on the bottom right.

And here's the result in a Jira issue.

attachment-monitor.png

The rule listens for new comments (see "11 seconds ago" in the image) and then automation adds another comment (see "10 seconds ago") containing a nicely formatted list of all attachments and related details. At least this way the developer can see if there's a material attachment change to be aware of.

Here's a list of all the available attachment smart values: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--attachment--

Note: The asterisk in my smart value example is there to accomplish the bulleted list formatting in the automated comment. And of course, Jira automatically adds a hyperlink for any issue IDs in comments.

I was able to link to the individual attachment files using {{content}} but that results in downloading the file locally, not displaying it in the browser.

So what do you think?

Hope this helps,

Rachel Wright
Author, Jira Strategy Admin Workbook

Rachel,

Thank you so much for your detailed response! It was most helpful :) I ended up implementing how you described. 

 

I did find a related bug that was logged with Atlassian that is causing the issue I described with adding attachments from the customer portal not triggering automation rules (https://jira.atlassian.com/browse/JSDSERVER-8680). It is in their short term backlog, so hopefully it will be resolved soon for other folks who are experiencing this as well!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS

Atlassian Community Events