The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi
I want to send information of issues in JSON format as a payload(using POST method) so that I can store it in a data base(requirement) also I would like to access it and work on it in a Third party app. Is this possible?
Yes that is possible.
You have to decide how/when to send this information. It could be triggered by a workflow transition/post function, based on a Scripted Listener or a Job that runs on a schedule.
Then once you've decided that and have one or more issue object, you have to decide what attribute of the issue (and custom fields) you want to construct your JSON with. E.g:
import groovy.json.JsonBuilder
import com.atlassian.jira.component.ComponentAccessor
def cfm = ComponentAccessor.customFieldManager
def custFieldObject = cfm.getCustomFieldObjectsByName('custom field name')[0]
//assumes issue is declared and available
def newObject = [:]
newObject.issueKey = issue.key
newObject.assigneeEmail = issue.assignee.emailAddress
newObject.customField1 = issue.getCustomFieldValue(customFieldObject)
def jsonString = new JsonBuilder(newObject).toString()
Then you need to figure out how you want to connect to your third party app and make sure you can authenticate etc.
Or maybe your third party app is flexible, in which case, you might be better off using a WebHook from the jira side to send a standard payload.
Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.