# Releases

## Sorting Hat 0.4 - (2017-07-17)

** New features and improvements: **

 * Mailmap and StackAlytics support.

   Mailmap and StackAlytics files can be converted to Sorting Hat JSON
   format using the new scripts `mailmap2sh` and `stackalytics2sh`.

 * Unify by sources.

   Giving a list of sources, this option allows to `unify` command to
   merge only those unique identities which belong to any of the given
   sources.

** Bugs fixed: **

 * Encoding error generating UUIDs in Python 3. Some special characters
   cannot be encoded in Python3. This caused function `uuid()` to fail
   when converting those characters. 'surrogateescape' handler was
   added to fix that problem.

 * Force `utf8_unicode_ci` collation on MySQL tables to fix integrity errors.
   MySQL considers chars like `β` and `b` or `ı` and `i` the same, when
   some collation values are set (i.e `utf8_general_ci`). This can raise
   integrity errors when Sorting Hat tries to add similar identities with
   these pairs of characters.

   For instance, if the identity:

       ('scm', 'βart', 'bart@example.com', 'bart)

   is stored in the database, the insertion of:

       ('scm', 'bart', 'bart@example.com', 'bart)

   will raise an error, even when these identities have different UUIDs.
   Forcing MySQL to use `utf8_unicode_ci` fixes this error, allowing
   to insert both identities.


## Sorting Hat 0.3 - (2017-03-21)

**NOTICE: UUIDs generated by SortingHat < 0.3.0 are no longer compatible.
Please check "Compatibility between versions" section from README.md file**

** New features and improvements: **

 * New algorithm to genere UUIDs.

   UUIDs were generated using case and accent sensitive values with the seed
   `(source:email:name:username)`. This means that for any identity with the
   same values in lower or upper case (i.e: `jsmith@example.com` and `JSMITH@example.com`)
   or with the same values accent or unaccent (i.e: `John Smith` or `Jöhn Smith`)
   would have different UUIDs for any of these combinations.

   The new algorithm changes upper to lower case characters and converts accent
   characters to their canonical form before the UUIDs is generated.

   This change is caused by the behaviour of MySQL with case configurations
   and accent and unaccent characters. MySQL considers those characters the same,
   raising `IntegrityError` exceptions when similar tuple values are inserted
   into the database. Generating the same UUID for these cases will prevent the
   error.

   Take into account that previous UUIDs are no longer compatible with this
   version of SortingHat. You should regenerate the UUIDs following the steps
   described in section *Compatibility between versions* from `README.md` file.

** Bugs fixed: **

 * Any non-empty value in email field was used during the affiliation. This
   caused some errors for non valid email addresses like with 'email@' cases,
   which raised a `IndexError` exception. This bug has been fixed using valid
   email addresses only during the affiliation.

 * Invalid database names were allowed in `init` command.


## Sorting Hat 0.2 - (2017-02-01)

** New features and improvements: **

 * Auto complete profile information with `autoprofile` command.

   This command autocompletes the profiles information related to a set of unique
   identities. To update the profile, the command uses a list of sources ordered
   by priority. Only those unique identities which have one or more identities
   from any of these sources will be updated. The name of the profile will be
   filled using the best name possible, normally the longest one.

 * GiHub identities matching method.

   This new method tries to find equal identities using those identities from
   GitHub sources. The identities must come from a source starting with a `github`
   label and the usernames must be equal.

** Bugs fixed: **

 * The parser for Gitdm files only accepted email addresses as valid aliases.
   This has been modified to accept any type of aliases. Thus, the input file
   passed to `gidm2sh` script will be a list of valid aliases instead of email
   aliases.
