Say that you work on a feature described by a single JIRA ticket and during the work, you:
- Create feature-specific code like the GUI or specific use-case behavior.
- Some of the code was generic so you placed this infrastructure code in a shared library.
As an example (deliberately simple), say that the ticket is about changing a message somewhere in the application and that the message should contain the current year somewhere in it. So you first amend your PHP code where the message is and also create a helper function
getCurrrentYear() in your
What is the best practice now to store these changes to a source code repository and assign those code changes to JIRA ticket(s)? (Assigning commit to a JIRA ticket means in our case adding a tag to a commit message, for instance "Implemented feature #123".)
As I see it, there are these main options:
- Create one commit and assign in to the given JIRA ticket.
- Create two commits (one for the use-case logic and one for the infrastructure code). Assign both of them to the single JIRA ticket.
- Assign only the feature-specific commit to the JIRA issue and leave the other unassigned (when viewing the ticket in JIRA, only the first commit will be visible in the "source code" tab).
- Similar to 3 but you have a generic ticket like "Infrastructure improvements".
Is there a best practice / recommended way? What are some of the benefits and problems of the various possibilities?