My need is to read a confluence page source and copy the same into a JIRA custom field from a JIRA transtion post function. Any ideas on how this can be achieved.
Is this possible using the groovy script runner? a sample code would help
Thanks
Sandeep
Community moderators have prevented the ability to post new answers.
It's more or less the same as https://gist.github.com/jechlin/cf9ccb524918993872d5, but instead of "post"ing to confluence you will use the API to get the markup source.
Thanks for the solution Jaime, I used the same code as indicated above with the following changes, this gives me the whole HTML rendered page, however i wanted to extract only the page source, what am I missing here? def authenticatedRequestFactory = confluenceLink.createAuthenticatedRequestFactory() ApplicationLinkRequest request = authenticatedRequestFactory.createRequest(Request.MethodType.GET, "URL of the confluence page "); request.addBasicAuthentication("xxx","xxx"); String xml_result = request.execute();
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.