Skip to content

bug/JIRA_CONNECTOR #69

Open
Open
@JIAQIA

Description

@JIAQIA

Bug Description
Encountered an issue while attempting to connect to JIRA. This was done by specifying JIRA_API_TOKEN, JIRA_URL, and USER_EMAIL, following the instructions on unstructured-io's JIRA connector documentation.

Issue
The connection did not function as anticipated. Upon examining the source code, I identified a problem in the JiraSourceConnector._get_issue_keys_within_projects method. Specifically, the method incorrectly returns self._get_all_project_ids() instead of issue keys.

Steps to Reproduce

  1. Set up a test environment using test_unstructured_jira_drive(creds_file) with the following configuration:
    runner = JiraRunner(
        processor_config=ProcessorConfig(
            verbose=True,
            output_dir="jira-ingest-output",
            num_processes=2,
        ),
        read_config=ReadConfig(),
        partition_config=PartitionConfig(
            metadata_exclude=[
                "filename",
                "file_directory",
                "metadata.data_source.date_processed",
            ],
        ),
        connector_config=SimpleJiraConfig(
            access_config=JiraAccessConfig(api_token=JIRA_API_TOKEN),
            url=JIRA_URL,
            user_email=JIRA_EMAIL,
        ),
    )
    runner.run()
  2. Execute the

above pytest case to reproduce the bug.

Expected Behavior
The example code should execute successfully without errors.

Suggested Fix
Modify the JiraSourceConnector._get_issue_keys_within_projects method. Instead of returning self._get_all_project_ids() directly, it might be more appropriate to assign project_ids = self._get_all_project_ids() and proceed with processing these project_ids to obtain the necessary issue keys.

Screenshots
(If applicable, include screenshots to help clarify the issue.)

Environment Information
To better diagnose the issue, please run python scripts/collect_env.py in your environment and attach the output here.

Additional Context
Feel free to provide any other relevant information or context regarding the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions