Introduction
Today, hosted version control services such as Bitbucket or Github add many extra functionalities which, practically, allow you to carry out the life cycle of an application without having to go to external applications.
Speaking of Bitbucket, tasks become one of these functionalities. It provides two simple but very powerful configuration options: JIRA and Trello. However, Bitbucket gives you the chance to use your own.
Wrike is an application that fits into the category of work management solution or task manager. Similar to Trello, the free version provides a fairly suitable environment for project management. It is fair to say that the commercial version contains many more features than the free one but for small groups of developers it is more than enough.

Linking Wrike and Bitbucket is not simple although not complicated either. The latter provides a links menu option into the configuration options and allows you to link the messages found into the commits with the tasks of an external management system. The only thing necessary is for the task manager to expose a URL to query. Wrike gives a solution to that.
Configuration
In Bitbucket, access the project you want to link with the external task management system. Go to the Settings option where there is a menu option called Links. There, click on the Add new link button. A new modal box will be displayed. Two option must be defined:

- The URL to which we will send the request. It will always be the same per project with a little parameterization to indicate how we link the task into the message of a commit. In the case of Wrike it would be something like this:
- Text that has been parameterized as a regular expression. When we visualize the commit, the link is activated and points to the task in the task manager. For example :
^WRIKE-([d]+)
There is a third option when closing the modal box:
- Require issue keys in commit messages, if activated, will prevent from pushing unwanted commits to the repository if the commit message has not been properly formatted.

After all, into the Bitbucket commit viewer, the url will link to the task manager:
