Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

track the attachments, added from Customer portal Edited

Hi, 

What kind of Attachments does the ServiceDeskComment interface show and return with getAttachments() method? 

I have tested it both for newly added files (Open the Customer Portal, attach the file to the comment, tap on Add button), and existing files (Open issue from Project Queues, open the comment dialogue, select the one of already attached files and tap to Add comment) and it returns an empty list.  

 

Tried to catch from listener on Custom event:

import com.atlassian.jira.component.ComponentAccessor
import org.apache.log4j.Logger;
import com.atlassian.jira.issue.attachment.Attachment
import com.atlassian.jira.issue.AttachmentError

def log = Logger.getLogger("com.onresolve.jira.groovy");
def issue = event.issue;

def comment = event.getComment();
log.debug "comment : " + comment;
def attachment = comment.getAttachments();

 and from listener on Issue Commented event: 

import com.atlassian.jira.component.ComponentAccessor
import org.apache.log4j.Logger;
import com.atlassian.jira.issue.attachment.Attachment
import com.atlassian.jira.ComponentManager

def log = Logger.getLogger("com.onresolve.jira.groovy");
def issue = event.issue;

Class serviceDeskCommentService = ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.atlassian.servicedesk.api.comment.ServiceDeskCommentService");
def serviceDeskCommentServices = ComponentAccessor.getOSGiComponentInstanceOfType(serviceDeskCommentService);

def comment = event.getComment();
log.debug "comment : " + comment;

def sdComment = serviceDeskCommentServices.getServiceDeskCommentByJiraComment(ComponentAccessor.getUserManager().getUserByName("jiraadmin"), comment);
log.debug "temp : " + sdComment;

 But debug returns me result in the following way (attachments empty). 

DEBUG [jira.groovy]: comment : com.atlassian.jira.issue.comments.CommentImpl@dbf8cab3
DEBUG [jira.groovy]: temp : Either.Right(ServiceDeskCommentImpl{comment=com.atlassian.jira.issue.comments.CommentImpl@dbf8cab3, attachments=[], isPublic=true})

What am I doing wrong? 

 

 

 

 

1 answer

@Saida Jafarova were you able to identify why?

I'm running in this problem and cant identify why it refuses to provide any attachments.

Hi @Parthiban Subramaniam

Unfortunately not. As SR support said me, this is because when Atlassian publish the event they dont add the attachments to the event in Service Desk, and there is not any workaround to catch them. 

I believe this is still an issue until now. It is the same even if you listen to ServiceDeskCommentEvent, although the method is obviously available for use. Hopefully, Atlassian will solve this soon

Hi,

We also have a problem with this, but in the form of getting the attachemnts that have come with an e-mail request. When we try to catch the attachemtns with the IssueCreateEvent Listener, through various methods, we can't get them.

Is there a reported bug in the Atlassian service desk that we can follow?

Cheers, 
Marina

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase

All you wanted to know about customer support KPIs

When working in customer support, it’s crucial to calculate, analyze and monitor specific numbers, called KPIs (Key Performance Indicators). They go hand-in-hand with customer satisfaction, problem d...

133 views 1 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you