Skip to content

Conversation

freudenfranz
Copy link

@freudenfranz freudenfranz commented Jun 25, 2025

Changes

  • Added a new add_issues_to_sprint tool to the Jira server.
  • Implemented the corresponding add_issues_to_sprint method in the SprintsMixin.
  • Added a new JiraSprintInfo model.
  • Added a unit test for the new tool.

Notes on Integration Tests

The integration test suite in the base project has several issues that prevent it from running successfully without modification. The following changes were made to the local environment to get the tests to pass:

  • Added a pytest fixture to tests/conftest.py to load the .env file.
  • Updated tests/test_real_api_validation.py to use the JIRA_TEST_ISSUE_KEY and JIRA_TEST_PROJECT_KEY environment variables.
  • Corrected several assertions and tool invocations in tests/test_real_api_validation.py to handle the API responses correctly.

These changes have been reverted in this branch, but they will be necessary for anyone who wants to run the integration tests.

Copy link
Owner

@sooperset sooperset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, @jeteve I left some comments

Copy link

This pull request has been automatically marked as stale because it has not had recent activity for 14 days. It will be closed if no further activity occurs. Please leave a comment or remove the 'stale' label if you believe this PR is still relevant. Thank you for your contributions!

@github-actions github-actions bot added the stale label Jul 12, 2025
freudenfranz and others added 13 commits July 16, 2025 11:19
…error handling](sooperset#566 (comment))

and this [comment about adding tests](sooperset#566 (comment))
add_issues_to_sprint
- added input validatlon
- removed HTTPError exeption handling as underlying library does this
- kept unexpected Error handling
- added new tests:
  - - test_add_issues_to_sprint_invalid_sprint_id
  - - test_add_issues_to_sprint_empty_list
  - - test_add_issues_to_sprint_invalid_issues_type
Eliminates duplicate functionality since moving a single issue to a sprint
is already handled by the existing add issues to sprint method.

Simplifies the API by reducing method redundancy and maintains the same
functionality through the more general bulk operation method.
Enables comprehensive testing of Jira sprint functionality by adding test for issue-to-sprint assignment workflow.

Fixes missing site_metadata parameter in Confluence preprocessor to maintain API consistency.
@freudenfranz
Copy link
Author

I added also a test, to test against the real api in tests/test_real_api_validation.py :

  • It creates a board (apparently a scrum board is needed for this)
  • Creates a Sprint
  • Creates an Issue
  • Adds issuo to Sprint
  • Verifies issue is in sprint
  • Cleans up the board

@freudenfranz
Copy link
Author

For running the tests I had to add a file conftest.py (NOT included now in commits).
Maybe it makes sense to add this. I didn't add it since it is unrelated to my PR.

"""This file is used to configure pytest"""

import pytest
from dotenv import load_dotenv


@pytest.fixture(scope="session", autouse=True)
def load_env():
    """Load environment variables from .env file before tests run"""
    load_dotenv()

@freudenfranz
Copy link
Author

Also one test failed and could be fixed by adding site_metadata={} to
src/mcp_atlassian/preprocessing/confluence.py

 # Create a converter
 converter = ConfluenceStorageFormatConverter(
     options=options,
     path=Path(temp_dir) / "temp.md",
     root_dir=Path(temp_dir),
     page_metadata={},
     site_metadata={},
 )

I also did not add this to my commits.

This commit addresses linting and formatting issues identified by the `pre-commit` hooks. The changes include:
- Removing unused imports
- Correcting import order
- Applying consistent code formatting across multiple files

These changes ensure the codebase adheres to the project's style guidelines and passes all pre-commit checks.
@freudenfranz freudenfranz requested a review from sooperset July 16, 2025 15:37
@github-actions github-actions bot removed the stale label Jul 17, 2025
Copy link

github-actions bot commented Aug 1, 2025

This pull request has been automatically marked as stale because it has not had recent activity for 14 days. It will be closed if no further activity occurs. Please leave a comment or remove the 'stale' label if you believe this PR is still relevant. Thank you for your contributions!

@github-actions github-actions bot added the stale label Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants