Skip to content

Jira issues search api end point updated by jira but it is not updated in jira webloader #9349

@Santhosh-Hanabi

Description

@Santhosh-Hanabi

Checked other resources

  • This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
  • I added a very descriptive title to this issue.
  • I searched the LangChain.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

// Same as in the doc

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."
  );
}

Error Message and Stack Trace (if applicable)

  • It wont retrieve all the data
  • Always empty array

Description

  • I tried to use use the jira web loader
  • it is not retrieving the data even i passed correct permission (auth)
  • I checked the code base. we are using below end point which is updated the by jira
 const API_ENDPOINTS = {
  SEARCH: "/rest/api/2/search",
};
Image
  • I tested locally with this endpoint. I am getting below error
Image
  • jira updated to below one
 const API_ENDPOINTS = {
  SEARCH: "/rest/api/2/search/jql",
};
  • i tested with that too. It is working
Image
  • We are not passing the errors to the user in the catch block, We are returning the empty array []. That's why we are getting empty jira issues
Image

System Info

node version
v22.14.0

npm version
10.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedThis would make a good PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions