General

Converter

class clickup_to_jira.converter.ClickUpToJIRAConverter(click_up_handler, jira_handler)[source]

Class responsible for converting ClickUp Tickets to JIRA Tickets.

convert(tickets)[source]

Convert ClickUp tickets to JIRA tickets.

Parameters

tickets (list(Ticket)) – The tickets to be converted

Returns

The converted tickets

Return type

list(Ticket)

convert_ticket(ticket)[source]

Covert ClickUp ticket to DataClass Ticket.

Parameters

ticket (ClickUp.Ticket) – The incoming Ticker

Returns

The dataclass Ticket

Return type

Ticket

Utils

clickup_to_jira.utils.get_item_from_user_input(name, selection_list, allow_none=False)[source]

Get proper item from list of items from user input.

Parameters
  • name (str) – The name of the parameter to be specified.

  • selection_list (list) – The ClickUp entity to search in.

  • allow_none (bool) – Allow the user to not specify a value.

Returns

The proper item

Return type

ClickUp.Team|ClickUp.Space|ClickUp.Project|ClickUp.list

clickup_to_jira.utils.get_with_to_specify_outcome(name)[source]

Get if user does not wish to specify an outcome.

Parameters

name (str) – The name of the parameter which is allowed to not be set.

Returns

Allow none ot not

Return type

bool

clickup_to_jira.utils.initialize_logging()[source]

Initialize logging configuration.

Scripts

migrate_to_jira

clickup_to_jira.scripts.migrate.main()[source]

Create JIRA issues from ClickUp tasks.

Handlers

ClickUp

class clickup_to_jira.handlers.clickup.ClickUpHandler(token: str, api_url: str = 'https://api.clickup.com/api/v1/', cache: bool = True, debug: bool = False, user_agent: str = 'pyclickup/0.1.4')[source]

Class responsible for retrieving info from ClickUp

add_comments_to_tasks(tasks)[source]

Add comments to tasks.

Parameters

tasks (list(Task)) – The tasks on which comments are added

Returns

The updated tasks

Return type

list(Task)

static add_parent_to_tasks(tasks)[source]

Add parent to tasks.

Parameters

tasks (list(Task)) – The tasks on which parent is added

Returns

The updated tasks

Return type

list(Task)

get_click_up_tickets()[source]

Get all ClickUp tickets.

Returns

The list of tickets

Return type

list(Ticket)

static get_sorted_tasks(tasks)[source]

Get ordered tasks with tasks before subtasks.

Parameters

tasks (list(Task)) – The tasks list

Returns

The ordered tasks list

Return type

list(Task)

get_task_comments(task)[source]

Get task comments.

Parameters

task (Task) – The task whose comments are to be retrieved

Returns

The list of task comments

Return type

list(Comment)

get_tasks_from_click_up()[source]

Get ClickUp tasks.

Returns

The list of ClickUp tasks

Return type

ClickUp(Task)

JIRA

class clickup_to_jira.handlers.jira.JIRAHandler(server=None, options=None, basic_auth=None, oauth=None, jwt=None, kerberos=False, kerberos_options=None, validate=False, get_server_info=True, async_=False, async_workers=5, logging=True, max_retries=3, proxies=None, timeout=None, auth=None)[source]

Class responsible for adding Ticket to JIRA.

add_comments(issue, ticket)[source]

Add comments to JIRA Issue.

Parameters
  • issue (jira.issue) – The issue to add comments to

  • ticket (Ticket) – The ticket to read comments from

assign_issue(issue, assignee)[source]

Assign an issue to a user.

None will set it to unassigned. -1 will set it to Automatic.

Parameters
  • issue (int|str) – the issue ID or key to assign

  • assignee (str) – the user to assign the issue to

Return type

bool

Return type

Assignment succeeded

assign_issue_to_user(issue, ticket)[source]

Assign JIRA issue to a user.

Parameters
  • issue (jira.issue) – The JIRA issue

  • ticket (Ticket) – The Ticket to retrieve the assignee from

create_base_jira_issue(ticket, project)[source]

Create a JIRA issue given the ticket and the JIRA project.

Parameters
  • ticket (Ticket) – The ticket to create to JIRA

  • project (str) – The project name to add the ticket to

Returns

The JIRA Issue

Return type

Jira.issue

create_jira_issue(ticket, project)[source]

Create a JIRA issue.

Parameters
  • ticket (Ticket) – The ticket to create

  • project (str) – The project name

Returns

The new ticket

Return type

jira.issue

create_jira_issues(tickets)[source]

Create JIRA issues:

Parameters

tickets (list(Ticket)) – The tickets to create

Returns

The list of created JIRA issues

Return type

list(jira.issue)

create_type_mappings(tickets)[source]

Create mappings between ClickUp labels and Jira Ticket types.

Parameters

tickets (list(Ticket)) – The tickets to create

Returns

The type mappings

Return type

dict

get_issue_from_summary(project, summary)[source]

Get issue from given summary.

Parameters
  • project (str) – Project to search in

  • summary (str) – The summary string

Returns

The JIRA issue

Return type

jira.issue

search_users(user, startAt=0, maxResults=50, includeActive=True, includeInactive=False)[source]

Get a list of user Resources that match the specified search string.

Parameters
  • user (str) – a string to match usernames, name or email against.

  • startAt (int) – index of the first user to return.

  • maxResults (int) – maximum number of users to return. If maxResults evaluates as False, it will try to get all items in batches.

  • includeActive (bool) – If true, then active users are included in the results.

  • includeInactive (bool) – If true, then inactive users are included in the results.

transition_issue_to_proper_status(issue, ticket)[source]

Transition JIRA issue to the desired status.

Parameters
  • issue (jira.issue) – The JIRA issue

  • ticket (Ticket) – The Ticket to retrieve the assignee from

update_status_mappings(ticket, issue)[source]

Update status mappings from user input.

Parameters
  • issue (jira.issue) – The JIRA issue

  • ticket (Ticket) – The Ticket to retrieve the assignee from