5

I want to link Tasks to our Bitbucket server. However, when I try to add the server (Tools > Tasks & Content > Configure servers), it wants me to choose a server type.

Q1. I have no idea what type to select. I haven't found any reference for this question.

Q2. If a type is chosen, it asks for the server url. Do I need just https://bitbucket.org or do I need something more specific?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Johan P
  • 89
  • 13

2 Answers2

26
Tools > Tasks & Content > Configure servers

Add Server type Generic

Tab: General

Server URL: https://api.bitbucket.org/2.0/repositories/*YOUR LOGIN*/*REPO_NAME*

Fill Username & Password

Put a tick in the Use HTTP authentication

Tab: Commit message

{summary} #{id} - When commiting ID will be set tasks

Tab: Server Configuration

Tasks List URL: {serverUrl}/issues?status=new&status=open

Single Task URL: {serverUrl}/issues/{id}

Response Type : JSON

and then fill the data as shown is not the screenshot (screenshot)

Farkhod Daniyarov
  • 748
  • 12
  • 14
6

Adding to the accepted answer, please note that version 2.0 of the Bitbucket API uses a different format for parameters noted here: Bitbucket API 2.0: Filter and sort API objects

The Task List URL should be: {serverUrl}/issues?q=%28state+%3D+%22new%22+OR+state+%3D+%22open%22%29

Peter Toi
  • 86
  • 2
  • 2