Skip to main content

Jira

Compatibility

Only available on Node.js.

This covers how to load document objects from issues in a Jira projects.

Credentials

  • You'll need to set up an access token and provide it along with your Jira username in order to authenticate the request
  • You'll also need the project key and host URL for the project containing the issues to load as documents.

Usage

import { JiraProjectLoader } from "@langchain/community/document_loaders/web/jira";

const host = process.env.JIRA_HOST || "https://jira.example.com";
const username = process.env.JIRA_USERNAME;
const accessToken = process.env.JIRA_ACCESS_TOKEN;
const projectKey = process.env.JIRA_PROJECT_KEY || "PROJ";

if (username && accessToken) {
// Created within last 30 days
const createdAfter = new Date();
createdAfter.setDate(createdAfter.getDate() - 30);
const loader = new JiraProjectLoader({
host,
projectKey,
username,
accessToken,
createdAfter,
});

const documents = await loader.load();
console.log(`Loaded ${documents.length} Jira document(s)`);
} else {
console.log(
"You must provide a username and access token to run this example."
);
}

API Reference:


Was this page helpful?


You can also leave detailed feedback on GitHub.