# Work Item

Get a work item by ID

* [`sfp work-item get`](#sfp-work-item-get)
* [`sfp work-item list`](#sfp-work-item-list)

## `sfp work-item get`

Get a work item by ID

```
USAGE
  $ sfp work-item get -i <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>]

FLAGS
  -e, --email=<value>              Email address for authenticated user. Ignored if --application-token is provided. Can
                                   be set via SFP_SERVER_USER env var.
  -i, --id=<value>                 (required) Work item ID or key
  -t, --application-token=<value>  Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                   (CLI flags take precedence over env vars).
      --repository=<value>         The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                   for Azure DevOps
      --sfp-server-url=<value>     URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                   config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Get a work item by ID

  Retrieves details of a work item. The platform is automatically determined from the project's workItems.provider
  configuration.

  ## Prerequisites
  The project must have workItems.provider configured:
  $ sfp server project update -r owner/repo -p configuration.workItems -v '{"provider": "jira"}'

  ## ID Formats by Platform
  - jira: Use issue key (e.g., DP-6, PROJ-123)
  - github: Use issue number (e.g., 42)
  - azure-devops: Use work item ID (e.g., 123)

  ## Examples
  # Get a Jira issue
  $ sfp work-item get --repository owner/repo --id DP-6

  # Get a GitHub issue
  $ sfp work-item get --repository owner/repo --id 42

  # Get an Azure DevOps work item
  $ sfp work-item get --repository owner/repo --id 123
```

*See code:* [*src/commands/work-item/get.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp work-item list`

List work items for a project

```
USAGE
  $ sfp work-item list [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>]
    [--status <value>] [--assignee <value>] [--type <value>] [--max-results <value>]

FLAGS
  -e, --email=<value>              Email address for authenticated user. Ignored if --application-token is provided. Can
                                   be set via SFP_SERVER_USER env var.
  -t, --application-token=<value>  Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                   (CLI flags take precedence over env vars).
      --assignee=<value>           Filter by assignee
      --max-results=<value>        [default: 50] Maximum number of results to return (1-100)
      --repository=<value>         The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                   for Azure DevOps
      --sfp-server-url=<value>     URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                   config:set server-url
      --status=<value>             Filter by work item status
      --type=<value>               Filter by work item type (e.g., bug, story, task)

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List work items for a project

  Lists work items with optional filters. The platform and boards are automatically determined from the project's
  configuration.

  ## Prerequisites
  The project must have workItems configuration set:
  $ sfp server project update -r owner/repo -p configuration.workItems -v '{"provider": "jira", "boards": ["DP",
  "PROJ"]}'

  ## Configuration
  - provider: The work item platform (jira, azure-devops, github)
  - boards: Array of boards/projects to filter (Jira project keys, Azure DevOps area paths)

  ## Filter Options
  - status: Filter by status (e.g., "To Do", "In Progress", "Done")
  - assignee: Filter by assignee
  - type: Filter by work item type (e.g., "bug", "story", "task")

  ## Examples
  # List all work items (uses boards from project config)
  $ sfp work-item list --repository owner/repo

  # Filter by status
  $ sfp work-item list --repository owner/repo --status "In Progress"

  # Filter by assignee with limit
  $ sfp work-item list --repository owner/repo --assignee john.doe --max-results 10
```

*See code:* [*src/commands/work-item/list.ts*](https://source.flxbl.io/flxbl/sfp-pro)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp/sfp-community/cli-reference-v51-release-v3/advanced/work-item.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
