Jira Integration in Outerbase
This article is about development of Jira Outerbase command as part of Outerbase & Hashnode hackathon
Introduction
Outerbase Commands offer a flexible method for simplifying a variety of tasks within the Outerbase ecosystem. It will integrate any popular APIs to view the details of the desired functionality effortlessly. For more information about Outerbase commands, please refer to the official documentation here
This article discusses about the development of Outerbase command for Jira API integration.
About Jira
Jira is a widely used project management and issue-tracking tool developed by Atlassian. It is designed to help teams and organizations effectively manage their work, projects, and tasks.
Jira excels at issue tracking and task management. It allows users to create, prioritize, assign, and track issues or tasks, making it particularly popular among software development teams for managing bugs, feature requests, and other development-related activities.
Testing Jira API
Below is the sample python snippet that will fetch the Jira issues from the jira url instance
import pandas as pd
import requests
def jira_search():
url = 'https://jira.linuxfoundation.org/rest/api/2/search'
data = []
jql= 'project = RELENG'
startAt = 0
maxResults = 100
total = 1
fields = ["key", "fields.summary","fields.status.name", "fields.reporter.name","fields.assignee.name","fields.priority.name"]
jira_issues_df = pd.DataFrame(columns=fields)
print(jira_issues_df)
parameters = {
'jql': jql,
'startAt': startAt,
'maxResults': maxResults,
'fields': 'assignee,status,resolution,key',
}
headers = {
'Content-Type': 'application/json','Authorization': "Bearer JIRA_API_TOKEN"
}
print('Requesting jira data... ' + str(startAt) + ' from ' + str(total))
response = requests.get(url, headers=headers)
res = response.json()
data += res['issues']
return data
Outerbase Command
After testing the API, it is time to write your Outerbase Command function. This is a simple get request that will fetch the Jira issues.
def UserCode():
response = http_send(
Request("GET", "https://jira.linuxfoundation.org/rest/api/2/search",{'Content-Type': 'application/json','Authorization': "Bearer JIRA_API_TOKEN"}, None)
)
return str(response.body, 'utf-8')
Jira Issues Viewer streamlit app
For the quick POC, I have developed a Streamlit App that fetches Jira issues from the particular hosted Jira instance. Below are the screenshots that explain about the App and its functionality
https://jira-command-outerbase.streamlit.app/
Demo Video & Github Repo Link
Please find the attached link to the demo video here & Github Repository link here
Conclusion
Integration of Jira as Outerbase command will help you to list the Jira issues of your hosted jira instance. Please let me know if you have any questions.
A big thank you for taking the time to read my article and shoutout to the outerbase & hashnode team for hosting this amazing hackathon. Please support me by liking the article and sharing the article if you like it, and follow me for more related articles.
#outerbase #outerbasehackathon #hashnode