Hi All,
Please may I get some assistance.
I am able to add attachments to issues from mail items using the following call:
messageHandlerContext.createAttachment(fileToAttach, fileName, attachment.getContentType(), user, mutableIssue);
However I cannot workout how to update the Issue's change history if the mail item is a response with an attachment added.
Any thoughts?
Community moderators have prevented the ability to post new answers.
Hi
Read this link carefully, it gives you the answer
you should call this IssueUpdater.doUpdate(com.atlassian.jira.issue.util.IssueUpdateBean, boolean)
inorder to change the history of the issue.
I found the below just before I went to lunch:
https://jira.atlassian.com/secure/attachment/29963/AttachFile.java
and with a little reading I found that exact call.
But as you have provided the answer I shall mark this as such.
Thank you for your time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricardo,
When you create a issue , then no entry gets created in issue history .
but if you update any field through post-function , then the entry goes into the issue while creating it.
After creation of issue only , any updation to issue have their entry in the history.so , attachment will not be reflected in the history.
Since , you are creating the issue through mail no updation will be reflected in history
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dipti,
Sorry I should edit my question,
I need to apply this based on mail responses with attachments...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think he has the issue and he is creating attachments for that issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitram,
Let me know what wrong i have said that you have downvoted my comment.
the changehistory api only gets history details.(doesnt update history)
@Ricardo,
is the create attachment through mail done by you , a issue update event ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your logic may be correct but that is not his question, he wants to change the history for an existing issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I dono this is right but you can try this
Issue mutableissue;
mutableissue.changeHistory()
use this method to change it.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitram,
I do not see that method when viewing the JIRA 5 API.
Could you please provide me with a link in the event I have missed it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this link https://docs.atlassian.com/jira/5.0/ search for the package
you will be able to fin it out.
Hope this Helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here is a detailed doc about change history, read this
https://developer.atlassian.com/display/JIRADEV/Change+History
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the object of messageHandlerContext ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this, This may help you,
http://docs.servicerocket.com/display/AtlassianPlugins/JIRA+Confluence+Link+Plugin+Usage+Guide
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.