Hi, my name is Ray Barham and I'm the developer of the JIRA Component Watchers Plugin. I'm have problems getting my plugin to work with JIRA 6. My plugin creates a custom notification type to handle sending notifications. The com.atlassian.jira.notification.type.NotificationType enum in jira-api specifies the notification types, but, any notification type not defined in this file is reported as invalid.
Here is some of the exception from the log:
[INFO] [talledLocalContainer] 2013-06-22 12:45:10,379 http-2990-16 ERROR admin 762x2077x1 18iaifs 127.0.0.1 /secure/CreateIssueDetails.jspa [jira.event.issue.IssueEventListenerHandler] Exception thrown invoking listener [com.atlassian.jira.event.listeners.mail.MailListener] : You have to provide a valid mapped string [INFO] [talledLocalContainer] java.lang.IllegalArgumentException: You have to provide a valid mapped string [INFO] [talledLocalContainer] at com.atlassian.jira.notification.type.NotificationType.from(NotificationType.java:55) [INFO] [talledLocalContainer] at com.atlassian.jira.event.listeners.mail.MailListener.addMailItems(MailListener.java:123) [INFO] [talledLocalContainer] at com.atlassian.jira.event.listeners.mail.MailListener.sendNotification(MailListener.java:95) [INFO] [talledLocalContainer] at com.atlassian.jira.event.listeners.mail.MailListener.issueCreated(MailListener.java:146) [INFO] [talledLocalContainer] at com.atlassian.jira.event.issue.AbstractIssueEventListener.workflowEvent(AbstractIssueEventListener.java:100) [INFO] [talledLocalContainer] at com.atlassian.jira.event.issue.IssueEventListenerHandler$IssueEventInvoker.invoke(IssueEventListenerHandler.java:51) [INFO] [talledLocalContainer] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66) [INFO] [talledLocalContainer] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32) [INFO] [talledLocalContainer] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60) [INFO] [talledLocalContainer] at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160) [INFO] [talledLocalContainer] at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79)
Is it possible to get around this? I can't make my plugin completely compatible with JIRA 6 unless my custom notification type can be handled by JIRA.
Thank you for any assistance.
-Ray
Community moderators have prevented the ability to post new answers.
Please see discussion of this issue at
https://jira.atlassian.com/browse/JRA-42344
In short - Notification Types were not declared as an official customisation API. They just happened to kind of work in 5.0 as an accident. If people think that they should be customisable then please raise an Improvement request on https://jira.atlassian.com/browse/JRA.
See https://developer.atlassian.com/display/JIRADEV/Java+API+Policy+for+JIRA for details of the official JIRA API policy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Ray,
I have the same erorror in recently upgraded from 5.1 to 6.2.2 JIRA .
Can you suggest solution ?
Does it affect other notiifcations ?
We use CW plugin : version 2.3.0
Regards,
Nikolai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After I updated jira, then the plugin, I noticed the error scrollling by every second tailing the log file. To stop the error I had to go the notification schemes and manually remove all the lines that used say
after the updates the lines looked like this
After I deleted the (Delete) lines the errors stopped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What version of JIRA (and the plugin) did you update to?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We went from 5.2.7 of jira to 6.2.5. I think the version of the componet watcher we had 2.3.0 of the plugin before update and now we are at 2.3.4. We have had all version of the plugin at one time and we have had all versions of JIRA since 3.X.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! I'll be updating my instance of JIRA soon and I'll try to report back my findings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ray, were you able to fix this issue? We utilize your plugin quite a bit and we're getting GB's of log data from it (with this same error) :-o
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ray, I'm consiring taking a look at the refactoring, I see the source code is available, maybe I can take a crack at it, unless you are already doing it now? Can you contact me and let me know if you have any thoughts on the refactoring? (mgarvin@avaya.com) I need to get management approval to commit some time to it, but want to at least explore what level of effort is involved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ray,
first of all, thanks for the effort made on component watchers plugin, we'd be using it on JIRA 6 as well, if it can be tailored to work.
Consulting the API docs my best guess would be that a refactor of the previous code would be needed, and the desired functionality could be achieved by implementing a NotificationFilter (https://developer.atlassian.com/static/javadoc/jira/6.0.3/reference/com/atlassian/jira/notification/NotificationFilter.html), which would only handle issue events, and would update recipient list according to component watcher settings (e.g. addRecipient could add all users/groups watching the component not already recipients, while removeRecipient could remove users not watching the component or not being part of a component watcher group).
NotificationFilterContext can identify if this context is specific to some issue event (reason), obviously the single relevant reason when this custom NotificationFilter should be fired.
I admit I might be overlooking some aspect, but for the first glance this could work with a medium refactor on the current code.
Please, keep us posted if having any progress.
Cheers,
Laszlo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was always impressed that you got that part to work with JIRA 5
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@ray First: thank's for your plugin :-) I walked through the source code today and noticed your workaround to reuse the "All watchers" notification type in the notification filter. I think it's still a bug in JIRA 6 since NotificationtypeManager.setIssueTypes() is broken now. For this reason i have created https://jira.atlassian.com/browse/JRA-42344
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.