or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.md
tile.json

tessl/pypi-apache-airflow-providers-jira

Deprecated Apache Airflow provider package for Atlassian Jira integration, redirects to apache-airflow-providers-atlassian-jira

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/apache-airflow-providers-jira@3.1.x

To install, run

npx @tessl/cli install tessl/pypi-apache-airflow-providers-jira@3.1.0

index.mddocs/

Apache Airflow Providers Jira (Deprecated)

A deprecated Apache Airflow provider package that enables integration with Atlassian Jira ticketing systems. This package serves as a compatibility layer that re-exports components from the newer apache-airflow-providers-atlassian-jira package.

⚠️ IMPORTANT: This package is deprecated as of version 3.1.0. Users should migrate to apache-airflow-providers-atlassian-jira for continued support and updates.

Package Information

  • Package Name: apache-airflow-providers-jira
  • Language: Python
  • Installation: pip install apache-airflow-providers-jira
  • Dependencies:
    • apache-airflow>=2.2.0
    • apache-airflow-providers-atlassian-jira (replacement package)

Core Imports

# Deprecated imports (still work but show warnings)
from airflow.providers.jira.hooks.jira import JiraHook
from airflow.providers.jira.operators.jira import JiraOperator
from airflow.providers.jira.sensors.jira import JiraSensor, JiraTicketSensor

# Direct package import (deprecated)
import airflow.providers.jira

Basic Usage

import warnings
from airflow.providers.jira.hooks.jira import JiraHook
from airflow.providers.jira.operators.jira import JiraOperator
from airflow.providers.jira.sensors.jira import JiraSensor

# Usage will trigger deprecation warnings
with warnings.catch_warnings():
    warnings.simplefilter("ignore", DeprecationWarning)
    
    # Create a Jira hook connection
    jira_hook = JiraHook(jira_conn_id='jira_default')
    
    # Use in a DAG operator
    jira_operator = JiraOperator(
        task_id='create_jira_ticket',
        jira_method='create_issue',
        jira_method_args={'fields': {'project': {'key': 'TEST'}, 'summary': 'Test Issue'}},
        dag=dag
    )
    
    # Use JiraSensor (generic sensor)
    jira_sensor = JiraSensor(
        task_id='check_jira_issue',
        jira_conn_id='jira_default',
        method_name='issue',
        method_params={'id': 'TEST-123', 'fields': 'status'},
        dag=dag
    )
    
    # Use JiraTicketSensor (specific ticket monitoring)
    jira_ticket_sensor = JiraTicketSensor(
        task_id='wait_for_jira_ticket',
        jira_conn_id='jira_default',
        ticket_id='TEST-123',
        field='status',
        expected_value='Done',
        dag=dag
    )

Recommended Migration:

# New recommended imports
from airflow.providers.atlassian.jira.hooks.jira import JiraHook
from airflow.providers.atlassian.jira.operators.jira import JiraOperator
from airflow.providers.atlassian.jira.sensors.jira import JiraSensor, JiraTicketSensor

Capabilities

Jira Connectivity

Provides hook for connecting to Jira APIs with authentication and basic API interaction capabilities.

class JiraHook(BaseHook):
    """
    Re-exported from airflow.providers.atlassian.jira.hooks.jira.JiraHook
    
    Jira interaction hook, a wrapper around JIRA Python SDK.
    Deprecated: Use airflow.providers.atlassian.jira.hooks.jira.JiraHook instead.
    
    Args:
        jira_conn_id (str): Reference to a pre-defined Jira Connection (default: 'jira_default')
        proxies (Any | None): Proxy configuration for JIRA client
    """
    
    default_conn_name: str = 'jira_default'
    conn_type: str = "jira"
    conn_name_attr: str = "jira_conn_id"
    hook_name: str = "JIRA"
    
    def __init__(self, jira_conn_id: str = default_conn_name, proxies: Any | None = None) -> None: ...
    
    def get_conn(self) -> JIRA:
        """
        Returns connection to JIRA client.
        
        Returns:
            JIRA: Authenticated JIRA client instance
            
        Raises:
            AirflowException: If connection cannot be established
        """

Jira Operations

Provides operator for performing Jira operations within Airflow DAGs, including creating, updating, and managing Jira issues.

class JiraOperator(BaseOperator):
    """
    Re-exported from airflow.providers.atlassian.jira.operators.jira.JiraOperator
    
    JiraOperator to interact and perform action on Jira issue tracking system.
    This operator is designed to use Jira Python SDK: http://jira.readthedocs.io
    Deprecated: Use airflow.providers.atlassian.jira.operators.jira.JiraOperator instead.
    
    Args:
        jira_conn_id (str): Reference to a pre-defined Jira Connection (default: 'jira_default')
        jira_method (str): Method name from Jira Python SDK to be called
        jira_method_args (dict | None): Required method parameters for the jira_method (templated)
        result_processor (Callable | None): Function to further process the response from Jira
        get_jira_resource_method (Callable | None): Function or operator to get jira resource
                                                   on which the provided jira_method will be executed
    """
    
    template_fields: Sequence[str] = ("jira_method_args",)
    
    def __init__(
        self,
        *,
        jira_method: str,
        jira_conn_id: str = 'jira_default',
        jira_method_args: dict | None = None,
        result_processor: Callable | None = None,
        get_jira_resource_method: Callable | None = None,
        **kwargs,
    ) -> None: ...
    
    def execute(self, context: Context) -> Any:
        """
        Execute the Jira method with provided arguments.
        
        Args:
            context: Airflow task context
            
        Returns:
            Any: Result from Jira method call, optionally processed by result_processor
            
        Raises:
            AirflowException: If Jira operation fails
        """

Jira Monitoring

Provides sensors for polling Jira issue states and monitoring specific ticket conditions in workflow orchestration.

class JiraSensor(BaseSensorOperator):
    """
    Re-exported from airflow.providers.atlassian.jira.sensors.jira.JiraSensor
    
    Monitors a jira ticket for any change.
    Deprecated: Use airflow.providers.atlassian.jira.sensors.jira.JiraSensor instead.
    
    Args:
        jira_conn_id (str): Reference to a pre-defined Jira Connection (default: 'jira_default')
        method_name (str): Method name from jira-python-sdk to be executed
        method_params (dict | None): Parameters for the method method_name
        result_processor (Callable | None): Function that returns boolean and acts as a sensor response
    """
    
    def __init__(
        self,
        *,
        method_name: str,
        jira_conn_id: str = 'jira_default',
        method_params: dict | None = None,
        result_processor: Callable | None = None,
        **kwargs,
    ) -> None: ...
    
    def poke(self, context: Context) -> Any:
        """
        Poke method to check Jira resource state.
        
        Args:
            context: Airflow task context
            
        Returns:
            Any: Result from Jira method call, optionally processed by result_processor
        """

class JiraTicketSensor(JiraSensor):
    """
    Re-exported from airflow.providers.atlassian.jira.sensors.jira.JiraTicketSensor
    
    Monitors a jira ticket for given change in terms of function.
    Deprecated: Use airflow.providers.atlassian.jira.sensors.jira.JiraTicketSensor instead.
    
    Args:
        jira_conn_id (str): Reference to a pre-defined Jira Connection (default: 'jira_default')
        ticket_id (str | None): ID of the ticket to be monitored
        field (str | None): Field of the ticket to be monitored
        expected_value (str | None): Expected value of the field
        field_checker_func (Callable | None): Custom function to check field values
    """
    
    template_fields: Sequence[str] = ("ticket_id",)
    
    def __init__(
        self,
        *,
        jira_conn_id: str = 'jira_default',
        ticket_id: str | None = None,
        field: str | None = None,
        expected_value: str | None = None,
        field_checker_func: Callable | None = None,
        **kwargs,
    ) -> None: ...
    
    def poke(self, context: Context) -> Any:
        """
        Poke method to check specific Jira ticket field.
        
        Args:
            context: Airflow task context
            
        Returns:
            Any: Result from field checker or default issue field checker
        """
    
    def issue_field_checker(self, issue: Issue) -> bool | None:
        """
        Check issue using different conditions to prepare to evaluate sensor.
        
        Args:
            issue: Jira Issue object
            
        Returns:
            bool | None: True if field matches expected value, False/None otherwise
        """

Deprecation Warnings

All modules in this package emit deprecation warnings when imported:

warnings.warn(
    "This module is deprecated. Please use `airflow.providers.atlassian.jira.*`.",
    DeprecationWarning,
    stacklevel=2,
)

Migration Guide

To migrate from this deprecated package:

  1. Update imports:

    # Old (deprecated)
    from airflow.providers.jira.hooks.jira import JiraHook
    from airflow.providers.jira.operators.jira import JiraOperator
    from airflow.providers.jira.sensors.jira import JiraSensor, JiraTicketSensor
    
    # New (recommended)
    from airflow.providers.atlassian.jira.hooks.jira import JiraHook
    from airflow.providers.atlassian.jira.operators.jira import JiraOperator
    from airflow.providers.atlassian.jira.sensors.jira import JiraSensor, JiraTicketSensor
  2. Update package dependencies:

    # Remove deprecated package
    pip uninstall apache-airflow-providers-jira
    
    # Install replacement package
    pip install apache-airflow-providers-atlassian-jira
  3. Update connection configurations: No changes needed - the same connection IDs and configurations work with the new package.

Types

# Re-exported types from underlying dependencies
from typing import Any, Callable, Sequence
from jira import JIRA
from jira.resources import Issue
from airflow.hooks.base import BaseHook
from airflow.models import BaseOperator
from airflow.sensors.base import BaseSensorOperator
from airflow.utils.context import Context
from airflow.exceptions import AirflowException
from jira.exceptions import JIRAError

Error Handling

Since this package only re-exports classes, error handling is delegated to the underlying apache-airflow-providers-atlassian-jira package. Common exceptions include:

  • JIRAError: Raised when JIRA API operations fail
  • AirflowException: Raised when Airflow-specific operations fail

Refer to the replacement package's documentation for specific error handling patterns and exception types.