By putting data into it.
I know that sounds facetious, but you need to explain the question more carefully because you're not being clear on what you mean. How are you using the issueevent object? Where's your code running? What are you actually trying to do? Why do you think you need to mess with the params in the event objects? Are you looking at extracting data from an event somewhere? Could you actually be talking about listener code where you put "params" in as part of the configuration? (The last one was what I assumed when I read the title, but that's because I'm tinkering with a listener at the moment)
OK, let me just elaborate.I have use case where i need to trigger a e mail on project level.I was using 4.0 version of jira where i was using this api to trigger mails-
sendLists(Set recipients, String sender, String senderFrom, EmailSubject emailSubject, Long templateId, String baseUrl, Map contextParams, com.atlassian.mail.MailThreader threader)
Now with the upgrade to 4.2, this API has changed and they have removed EmailSubject from the API, however i removed the this parameter and added a vm in the /subject folder as mentioned in the link .
http://confluence.atlassian.com/display/JIRA/Customising+Email+Content
But, this is not working because TemplateContext what i was using before is not comptaible ot this type, so i had to extend it with the TemplateContext with the one of jira-
com.atlassian.jira.mail.TemplateContext
This solved by compatitbilty issue but i was left in intantiating this object by the following contructor-
TemplateContext(IssueEvent issueEvent, TemplateIssueFactory templateIssueFactory, FieldLayoutManager fieldLayoutManager, RendererManager rendererManager,JiraDurationUtils jiraDurationUtils, EventTypeManager eventTypeManager, DiffViewRenderer diffViewRenderer, com.atlassian.plugin.webresource.WebResourceManager resourceManager)
Now,I have IssueEvent object to be instantiated though my email notification is not issue level its project level, so i dont have any issue event listener to trigger emails, its link on click on button in my plugin i want to trigger a email.
To create IssueEvent Object i found some code-
IssueEvent issueEvent=new IssueEvent(issue,Map params, com.atlassian.crowd.embedded.api.User
user, Long eventTypeId)
;
As my mail notification is project level, i dont want any issue or params to be filled and send , but as just to trigger notification i want to fill this so that i dont get NullPointer Exception.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.