I want to create custom form plugin with some input fields and on form submit event i want to call a Restful Web Service. I want to know to solve the above purpose we need JIRA Source Code or it can be done by another technique. Please suggest me a best approach to do this.
Community moderators have prevented the ability to post new answers.
Hey, exactly what do you want to do on jira from your WBRT application?
check the following rest client which is used to create issue issue on jira using REST
package com.rest.client; import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.WebResource; import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter; public class RESTclient { public static void main(String[] args) { try { Client client = Client.create(); client.addFilter(new HTTPBasicAuthFilter("username", "password")); WebResource webResource = client.resource("http://<URL>/rest/api/2/issue"); String input="{\"fields\":{\"project\":{\"key\":\"JIRA\"},\"summary\":\"Test Ticket\",\"description\":\"This is a test CR\", \"reporter\": {\"name\": \"prasad\"},\"issuetype\":{\"name\":\"Defect\"},\"versions\":[{\"name\":\"1.1\"}],\"customfield_10692\":{\"value\":\"Stability\"},\"customfield_10430\":{\"value\":\"Stability\"},\"customfield_10005\":{\"value\":\"Blocker\"},\"components\":[{\"name\":\"test\"}]}}"; ClientResponse response = webResource.type("application/json").post(ClientResponse.class, input); String output = response.getEntity(String.class); System.out.println("Output from Server .... \n"); System.out.println(output); } catch (Exception e) { e.printStackTrace(); } } }
Hi All,
i want to send some input to WBRT(PHP app.) and get some response from it.
Thanks,
Vinay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
do you want to send some infromation from jira to WBRT application and get some data?
or
do you want to send some infromation from WBRT to jira and get some data?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinay,
No need of changing the JiRA source code , a simple restful webservice service plugin can achieve this functionality. Through rest API , send the input details through JSON or XML.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vinay,
Did my solution helped you , if yes please accept the answer.
But if you found a better solution , then please share with me :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dipti,
I want to interact JIRA with WBRT(PHP Web Application) through Restful Web Service plugin, Is it possible.
Please provide me a sample code for it if possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what operation you are trying to on jira from WBRT application?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vinay,
This is a sample rest webservice code :https://bitbucket.org/atlassian_tutorial/refapp-rest-service-plugin/src
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.