When you add Manuscript to Kiln, you get a full-circle audit history with your cases and your code.
- 1 Linking Manuscript Cases to Changesets
- 2 Linking Manuscript Cases to Code Reviews
- 3 What does Kiln use to parse commit messages for case association?
Linking Manuscript Cases to Changesets
As of Kiln 2.9, code reviews are no longer stored as a Manuscript case. There are a few ways to associate a Manuscript case with a Kiln changeset and/or review.
Manually via the “Add a case” Button
Link a case to a changeset when viewing the changeset in Kiln. At the top right, click “Add a case“, and in the search box enter the case number or case title. Click the “Add” button to associate the case to the changeset.
Removing a Case Association
In the event a changeset is associated to an undesired case, or vice versa, remove the case association. Click “# case” or “# cases” button where ‘#’ is the number of associated cases, then click the red encircled ‘X’ to remove the case from the changeset. This can be done regardless of manually or automatic case association.
Automatically Linking via Commit Message
Before you push your code to Kiln, ensure your commit message contains at least “case 123“, where “123” is an example case number. When Kiln sees this, it will automatically associate this changeset to case 123.
git commit -m "fixing case 123"
Kiln provides several other options for your commit messages to automatically link to cases. Read more below.
When this association is done, the commit message automatically hyperlinks the case number to your Manuscript account. This can help in navigation between changesets and cases.
Similarly to how a Code Review number can be mentioned in a case comment, you can mention a case number in a Code Review comment. Simply enter the text “case 493”, for example, and your comment will automatically hyperlink to the case 493.
Linking Manuscript Cases to Code Reviews
To associate a Manuscript case with a Kiln Code Review, that means that the case must be associated with a changeset where that changeset is part of a Code Review. The above instructions show how to associate a case to a changeset.
Once the changeset exists in Kiln, ensure that you associate the changeset with the Review!
What does Kiln use to parse commit messages for case association?
Here is the regular expression, case insensitive, we use to parse commit messages for case numbers:
Kiln On Demand
s*((Bug[sz]?s*IDs?)|cases?)s*[#:; ]+(((?d+)([ ,:;#](and)?)*)+)
Kiln For Your Server
b(?(review|case|bug[zs]?(s| )*(id)?:?)s?(s| )*([#:; ]| )+)((([ ,:;#]|and)*)(?d+))+