You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2005/12/18 23:15:10 UTC

svn commit: r357524 - /maven/sandbox/issue/rissue/issue.rb

Author: jvanzyl
Date: Sun Dec 18 14:15:06 2005
New Revision: 357524

URL: http://svn.apache.org/viewcvs?rev=357524&view=rev
Log:
o adding some rest calls to assign permission schemes and notification schemes the xmlrpc and soap interfaces
  don't appear to cut it.

Modified:
    maven/sandbox/issue/rissue/issue.rb

Modified: maven/sandbox/issue/rissue/issue.rb
URL: http://svn.apache.org/viewcvs/maven/sandbox/issue/rissue/issue.rb?rev=357524&r1=357523&r2=357524&view=diff
==============================================================================
--- maven/sandbox/issue/rissue/issue.rb (original)
+++ maven/sandbox/issue/rissue/issue.rb Sun Dec 18 14:15:06 2005
@@ -37,14 +37,22 @@
   end
 
   # The issue is a struct with all the issue information
-  def closeIssue( issue )
-    id = issue['id']
-    assignee = issue['assigneeid']
-    query = "#{@config['server']}/secure/CommentAssignIssue.jspa?resolution=1&action=2&id=#{id}&assignee=#{assignee}&Close%20Issue=Close%20Issue&os_username=#{@config['user']}&os_password=#{@config['password']}"    
+  def assignPermissionScheme( project, notificationSchemeId )
+    projectId = project['id']
+    query = "#{@config['server']}/secure/project/SelectProjectPermissionScheme.jspa?schemeIds=#{notificationSchemeId}&projectId=#{projectId}&Associate=Associate&os_username=#{@config['user']}&os_password=#{@config['password']}"
     url = URI.parse(query)
     res = Net::HTTP.get(url)
     puts res
-  end
+  end  
+  
+  # The issue is a struct with all the issue information
+  def assignNotificationScheme( project, notificationSchemeId )
+    projectId = project['id']
+    query = "#{@config['server']}/secure/project/SelectProjectScheme.jspa?schemeIds=#{notificationSchemeId}&projectId=#{projectId}&Associate=Associate&os_username=#{@config['user']}&os_password=#{@config['password']}"
+    url = URI.parse(query)
+    res = Net::HTTP.get(url)
+    puts res
+  end  
 
   # Delegate calls to the underlying server where possible
   def method_missing(method_name, *args)