In a previous blog post, I discussed what I learned about the quality of user stories. Better user stories would make things easier to implement. I couldn’t give any concrete examples of what I did and what I thought would be better because of Seapine’s pesky confidentiality thing – we don’t like to make announcements of features that will be in a release prematurely. Anyway, now that the features in Surround SCM 2011.1 are common knowledge, I’d like to share specifics of what I learned with you.
The first feature that I worked on was the ‘edit comments’ feature. Now, this is my first IRL Agile experience – thus far it was only books and classes – so please no comments that I should’ve realized before that I was an idiot.
The user stories were:
1. As an admin, I want to be able to edit all non-system generated comments for file history events.
2. As a user, I want to be able to edit comments that I entered for file history events
3. Comments that have been edited should be saved in the database.
4. As an admin, I want to be able to grant/deny permission to edit own comments and have this be enforced.
5. As an admin, I want to be able to grant/deny permission to edit others comments and have this be enforced.
If I had to do over the user stories that I’d have would be:
1. As an admin, I can set security for Edit Own Comments that is saved in the database
2. As an admin, I can set security for Edit Other Users’ Comments that is saved in the database
3. As a user, I can make the comment field editable in the history details dialog for non-system comments if my security allows it. System generated comments are never editable.
4. As a user, if I click on the Next or Previous button within the history details dialog, the comments become non-editable again
5. As a user, if I change the comments on any labeling events, security is checked, the new comments are saved in the database, and the new comments are shown in the GUI.
6. As user, if I change the comments on any regular file events, security is checked, the new comments are saved in the database, and the new comments are shown in the GUI.
7. CLI list group and edit group commands should support all new security.
If I had it to do over, I wouldn’t have forgotten the good ole CLI, and I would’ve made the user stories deeper. My previous user stories split being able to change something from the changes being saved in database.
My cuts were horizontal
– instead of a user story accomplishing releasable functionality, I fell into the trap of dividing the user story by layers. One user story handled the UI/application layer, and a different user story handled the database layer. And, I missed some things – the comments when a file is added/removed from a label are stored in a table with label events, and the comments for regular file actions (add, edit, checkin) are stored in a different table, so the label events deserved their own user story.
My cuts should’ve been vertical.
Each user story should accomplish something releasable. There should be no separate, ‘oh yeah, and everything is saved in the database’ story. The stories should pass through all layers if it’s necessary in order to accomplish something of value (and not appear half-done).
I realize that I haven’t mentioned anything about User Acceptance Testing in either blog about user stories. I couldn’t convince anyone that my features shouldn’t go through the normal QA process, so my User Acceptance Testing was done via Test Cases that our QA team wrote.