Issue Details (XML | Word | Printable)

Key: JRA-8557
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Elliot Metsger
Votes: 6
Watchers: 7
Operations

If you were logged in you would be able to see more operations.
JIRA

Add a addWatcher( RemoteUser ) and / or addWatcher( RemoteUser[] ) RPC / SOAP method

Created: 17/Nov/05 04:12 PM   Updated: 23/May/08 12:11 PM
Component/s: Remote API (SOAP & XML-RPC)
Affects Version/s: 3.3.3
Fix Version/s: None

Time Tracking:
Not Specified

Participants: Anton Mazkovoi [Atlassian], Elliot Metsger, HVS, Mark Chaimungkalanont [Atlassian] and Wayne Branagh
Since last comment: 15 weeks, 1 day ago
Labels:


 Description  « Hide
Could an additional method addWatcher( RemoteUser ) or addWatcher( RemoteUser[] ) be added to the SOAP RPC interface?

A little bit of background on the use case:
Our end users submit issues to Jira via a webform (so they don't have to deal with the complexity of Jira). We have a servlet which takes user input, evaluates a set of rules, decides who the issue should be assigned to (and to what components etc), and creates the issue in Jira via SOAP.

Our "ruleset" currently is a bunch of ugly "if/thens" but I am exploring using a something like Drools (http://www.drools.org) to evaluate a ruleset which is in an XML file.

Anyway, we want to add a rule to our servlet which says: If an issue has a priority > X, then add my supervisor as a watcher to the issue. Right now I'm unable to do this b/c there isn't (to my knowledge) an addWatcher() method for the IssueService. Is that something that could be added in the near future?

Thanks!



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Elliot Metsger added a comment - 17/Nov/05 04:16 PM
Am looking right now at the RPC Plugin source and have downloaded the Plugin Dev kit - seeing if I can add the functionality without having access to the Jira source code!

Mark Chaimungkalanont [Atlassian] added a comment - 18/Nov/05 12:08 AM
Elliot,

You should be able to do this. You have access to the JIRA jar file so you can access all the methods in JIRA, but just not the source. You might want the API docs to help you out instead

http://www.atlassian.com/software/jira/docs/api/latest/

You would want to check out the WatcherManager object

Cheers

Mark C


Elliot Metsger added a comment - 18/Nov/05 04:02 PM
Ok i have most of the code done. But I added a watcherManager to soap.service.IssueServiceImpl. My question is, do I need to look at PicoContainer in order to inject a new watcherManger or can I obtain a watcherManager reference from an already existing object referenced by IssueServiceImpl?

Elliot Metsger added a comment - 18/Nov/05 04:18 PM
Currently I retrieve the watcherManger like so inside of the IssueServiceImpl constructor:
this.watcherManager = (WatcherManager)ComponentManager.getInstance( )

.getContainer( ).getComponentInstance( WatcherManager.class );

Is that the best way to go about getting the watcherManager?


Anton Mazkovoi [Atlassian] added a comment - 21/Nov/05 03:00 AM
Hi Elliot,

You can get the WatcherManager statically as you have shown above.

However, adding it as a dependency to your constructor and then keeping a reference to it is betetr however. If you look at the constructor of the IssueServiceImpl it already has quite a few managers declared as dependencies in the constructor.

Anton


HVS added a comment - 25/Apr/08 09:34 AM
Are there any plans to add the functionality to allow adding watchers to issues through the SOAP API? This would be a great help to us, as it is the one feature missing that is holding us back from full integration with our environment right now.

HVS


Wayne Branagh added a comment - 23/May/08 12:11 PM
This should be in the SOAP API.

Can the equivalent be achieved by pulling the issue key from the jiraissue table then adding an entry to the userassociation table ? Does any additional bookkeeping need to be done?