# Update User Story — Taiga

> Update an existing user story in a Taiga project. See the documentation

- Key: `taiga-update-userstory`
- Type: Action (Write)
- Version: 0.0.2
- App: Taiga (`taiga`) — https://pipedream.com/apps/taiga.md
- This page (HTML): https://pipedream.com/apps/taiga/actions/update-userstory
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/taiga/actions/update-userstory/update-userstory.mjs

## Description

Update an existing user story in a Taiga project. [See the documentation](https://docs.taiga.io/api.html#_user_stories)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `projectId` | `string` | Yes | Select a project or provide a project ID Options are loaded from the connected account. |
| `userStoryId` | `string` | Yes | Select a user story or provide a user story ID Options are loaded from the connected account. |
| `subject` | `string` | No | The user story subject/title |
| `description` | `string` | No | The user story description |
| `status` | `string` | No | Select a user story status or provide a user story status Options are loaded from the connected account. |
| `assignedTo` | `string` | No | User to assign the user story to Options are loaded from the connected account. |
| `tags` | `string[]` | No | Tags to associate with the user story |
| `backlogOrder` | `integer` | No | The order in the backlog |
| `kanbanOrder` | `integer` | No | The order in the kanban |
| `sprintOrder` | `integer` | No | The order in the sprint |
| `clientRequirement` | `boolean` | No | Whether the user story is a client requirement |
| `isBlocked` | `boolean` | No | Whether the user story is blocked |
| `milestone` | `string` | No | Milestone to associate the user story with Options are loaded from the connected account. |
| `points` | `object` | No | A dictionary of points. The key is the id of the role and the value is the id of the points. Format: {"10469741": 20817870, "10469742": 20817871, "10469743": 20817872, "10469744": 20817873} |
| `teamRequirement` | `boolean` | No | Whether the user story is a team requirement |
| `watchers` | `string[]` | No | Users to watch the user story Options are loaded from the connected account. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "taiga",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "taiga-update-userstory",
  arguments: {
    projectId: "Project ID",
    userStoryId: "User Story ID",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "taiga-update-userstory",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    taiga: { authProvisionId: "apn_xxxxxxx" },
    projectId: "Project ID",
    userStoryId: "User Story ID",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "taiga-update-userstory",
    "configured_props": {
      "taiga": { "authProvisionId": "apn_xxxxxxx" },
      "projectId": "Project ID",
      "userStoryId": "User Story ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/taiga.md · All apps: https://pipedream.com/apps
