Skip to content

Feature: JIRA issue import - #2178

Open
thisisthedave wants to merge 6 commits into
callumalpass:mainfrom
thisisthedave:feature/jira-issue-import
Open

Feature: JIRA issue import#2178
thisisthedave wants to merge 6 commits into
callumalpass:mainfrom
thisisthedave:feature/jira-issue-import

Conversation

@thisisthedave

Copy link
Copy Markdown

This PR adds Jira issue import support through the optional
obsidian-jira-issue plugin. Imported issues are converted into
TaskNotes tasks using configurable field mappings, including
Jira paths, templates, fixed values, list merging, enum
remapping, and user-defined fields. The settings UI includes an
ephemeral sample-issue preview and a collapsible, resizable raw JSON viewer with clipboard support.

Imports use TaskNotes’ existing creation defaults and filename-
sanitization pipeline. Each task includes a JIRA:PROJ-1234
backlink, preserves mapped issue details, and optionally
inherits the active note as its project when enabled—unless the
Jira mapping explicitly supplies projects.

image

Jira issue fields are mapped into the new TaskNotes task
image

image image image

  The new command:

  - Prompts for and validates a Jira issue key.
  - Resolves the optional obsidian-jira-issue dependency.
  - Runtime-validates its api.base.getIssue() API.
  - Fetches and validates the Jira response.
  - Maps baseline fields including title, description, status,
    priority, dates, estimate, and labels.

  - Creates exactly one task through the current TaskNotes
    creation service, including defaults and templates.

  - Reports invalid keys, missing/incompatible plugins, fetch
    failures, malformed responses, and creation failures
    separately.
  - Configurable Jira sources using:
      - Jira JSON paths
      - $path templates
      - Fixed values
      - Disabled mappings

  - Multiple merged sources for tags, projects, contexts, and
    list-valued user fields.

  - Configurable status, priority, and context remapping.
  - Typed coercion for text, numbers, dates, booleans, and lists.
  - Jira seconds-to-TaskNotes-minutes estimate conversion.
  - Atlassian rich-text description extraction.
  - Safe path traversal that rejects prototype access and
    malformed paths.

  - Versioned settings with validation and legacy mapping
    migration.

  - V5 user-field mappings keyed by stable field ID, so
    frontmatter-key renames do not break mappings.

  - A resettable mapping editor under the Integrations settings
    tab.

  - Unmapped empty lists remain undefined so normal TaskNotes
    creation defaults still apply.
- Explicit sample issue fetch with loading and error states.
  - Preview values recompute when mappings change without
    refetching.

  - Displays resolved, empty, missing, and invalid mapping
    states.

  - Collapsed raw JSON viewer using inert text rendering.
  - Raw JSON capped at 50,000 characters; individual values
    capped at 500.

  - Sample issue key and payload remain ephemeral and are never
    persisted.

  - Added localized UI strings and preview styling.
  - Added regression tests for mapping states, escaping, loading/
  - Imported task details receive a Jira backlink.
  - Valid Jira hosts produce a direct /browse/ISSUE-KEY Markdown
    link.

  - Credentials, query parameters, and unsafe protocols are
    excluded.

  - Missing or unsafe hosts fall back to the companion plugin’s
    JIRA:KEY syntax.

  - Existing details are preserved.
  - Existing backlinks are detected to prevent duplication.
  - The active note becomes the project when the existing parent-
    note setting is enabled.

  - Explicitly mapped Jira projects take precedence.
  - Filename safety continues through upstream
    TaskCreationService sanitization and filename generation.
Removed:                                                    - Jira host and self response typing.
  - URL parsing and construction.
  - Protocol and credential handling.
  - Direct Markdown-link generation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant