---
schema: rendered-html/v1
title: "Clone Issue | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/Clone-Issue.html
generated_at: 2026-06-11T14:41:02.747982+00:00
---

Feedback

Thanks for your feedback!

Was this page helpful?

YesNo

Developer Portal for YouTrack and Hub

- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- JavaScript Workflow Quick Start Guide
- Create a Workflow
- Edit a Workflow
- Workflow Rule Types
- Transactions
- Use Cases for Workflows
- Web-based Workflow Editor
- Using an External Code Editor
- Default Workflows
- Assignee Visibility
- Clear Fix Versions
- Clone Article
- [Clone Issue](Clone-Issue.html)
- Comments
- Default Description
- Dependencies
- Due Date
- Duplicates
- Forgotten Attachment
- Helpdesk
- Issue Property Combinations
- In Progress Work Timer
- Kanban
- Notify Reporter to Approve Fix
- Notify When Dependency Resolved
- One Vote Comment
- Pomodoro Timer
- Process Spam
- Profanity Blocker
- Referred Issues
- Replace Links
- Scrum
- Set Fix Versions
- SLA Priority
- Slack Notifications
- Stopwatch-style Work Timer
- Subsystem Assignee
- Subtask Inherit Assignee
- Subtask Inherit Fix Versions
- Subtask Inherit Subsystem
- Subtasks
- Task Assignee
- Time Management
- Untag on Reopen
- Update Fixed in Build
- Vote Blocker
- Watcher by Votes
- Won't Fix Build
- Custom Workflow Repository
- JavaScript Workflow Reference
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Hub REST API

1. YouTrack Workflows
2. Default Workflows
3. [Clone Issue](#0)

# Clone Issue﻿

Last modified: 07 May 2026

This workflow contains two action rules that let users clone issues.

|  |  |
| --- | --- |
| Name | @jetbrains/youtrack-workflow-clone-issue |
| Auto-attached | yes |
| Modules | [Clone issue](/help/youtrack/devportal/Clone-Issue.html#clone-issue) (action rule)  [Clone issue as draft](/help/youtrack/devportal/Clone-Issue.html#clone-issue-as-draft) |

## Use Case﻿

This workflow is designed to help users make copies of existing issues so they can quickly track activities that are performed on a regular basis. These are written as action rules, so users can perform this operation on the fly, as required.

The rules that belong to this workflow serve different purposes:

- The Clone issue rule creates issues in a reported state. This means that notification events are triggered as soon as the clone is created. If you need to make any changes to an issue that is created as a clone with this operation, users may receive a second round of notifications.
- The Clone issue as draft rule creates issue drafts. Notification events are only triggered when you have finished editing the draft and report the issue.

To learn more about clone operations in YouTrack, see Clone Issues.

## Rules﻿

This workflow has two rules that let users clone issues in different ways.

| Rule | Description |
| --- | --- |
| [Clone issue](/help/youtrack/devportal/Clone-Issue.html#clone-issue) | Creates a copy of an issue and reports it in the same project as the original.  This workflow runs when you use the `clone` command in the Command Window or select the Clone issue action in the issue toolbar. |
| [Clone issue as draft](/help/youtrack/devportal/Clone-Issue.html#clone-issue-as-draft) | Creates a copy of one or more selected issues as new issue drafts instead of reporting them automatically in the original project. You can find these copies in the list of Drafts when you create a new issue.  This workflow runs when you use the `clone as draft` command in the Command Window or select the Clone issue as draft action in the issue toolbar. |

### Clone issue﻿

First, the rule verifies that the issue has already been reported. If true, it creates a copy of the issue in context with the `createCopy()` method. If successful, YouTrack displays a confirmation message.

Note that the `createCopy()` method belongs to YouTrack's internal workflow API. When writing your own workflows, use `Issue.copy()` instead. For details, see reference.

```
const workflow = require('@jetbrains/youtrack-scripting-api/workflow');
const entities = require('@jetbrains/youtrack-scripting-api/entities');

exports.rule = entities.Issue.action({
  title: 'Clone issue',
  command: 'clone',
  guard: (ctx) => {
    return ctx.issue.isReported;
  },
  action: function (ctx) {
    const newIssue = ctx.issue.createCopy(); // WARNING! Do not use this method in your workflows. Use Issue#copy() instead
    workflow.message('A clone of the current issue has been created: <a href="{0}">{1}</a>', newIssue.url, newIssue.id);
  }
});
```

### Clone issue as draft﻿

First, the rule verifies that the issue has already been reported. If true, it creates a copy of the issue in context with the `createDraftCopy()` method and saves it as a draft. If successful, YouTrack displays a confirmation message.

Note that the `createDraftCopy()` method belongs to YouTrack's internal workflow API. When writing your own workflows, use `Issue.copy()` instead. For details, see reference.

```
const workflow = require('@jetbrains/youtrack-scripting-api/workflow');
const entities = require('@jetbrains/youtrack-scripting-api/entities');

exports.rule = entities.Issue.action({
  title: 'Clone issue as draft',
  command: 'clone as draft',
  guard: (ctx) => {
    return ctx.issue.isReported;
  },
  action: function (ctx) {
    const newIssue = ctx.issue.createDraftCopy(); // WARNING! Do not use this method in your workflows. Use Issue#copy() instead
    workflow.message('A clone of the current issue was saved to your list of drafts. <a href="{0}">Edit draft</a>', newIssue.url);
  }
});
```

- [Clone Issue](/help/youtrack/devportal/Clone-Issue.html)
- [Use Case](/help/youtrack/devportal/Clone-Issue.html#use-case)
- [Rules](/help/youtrack/devportal/Clone-Issue.html#rules)

Clone ArticleComments

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

Copyright © 2000–2026 JetBrains s.r.o.
