Skip to main content

Learn About Version Control and Agile Planning

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain how to get started with version control using Git snapshots.
  • Explain the importance of admin-friendly version control for Salesforce teams.
  • Explain the benefits of tying changes to user stories.

Agile Planning and Scrum

Humans haven’t been creating software applications very long. We sometimes compare it to other things that humans create. We use terms like building and architecture to compare software to construction, and we use terms like process and delivery to compare software to manufacturing. But software is fundamentally different from the kinds of things humans have created in the past.

One difference is that it’s easy for people to create something with almost no raw materials; for example, you can sign up for a Salesforce Developer Edition org for free and start creating the world’s next great app. Another difference is that the cost of distributing an application to a billion people isn’t that much higher than distributing it to just a few people. Finally, you can make deep changes to an application even after people start to use it. That’s not true of a construction project.

So the way we approach building software needs to be different from how we create other things. In 2001, a group of software experts laid out their insights and values in the Agile Manifesto. Agile principles continue to inspire teams to improve how we build software.

One popular agile practice is called Scrum, in which small, self-organizing teams focus on delivering work in periodic increments called sprints, which might last 2 weeks or more. Requirements are organized into small pieces, often called user stories, that each bring some value. User stories are held in a backlog until they are scheduled for a particular sprint.

You need a place to keep track of and collaborate on all those improvement ideas. Tools that keep track of user stories are sometimes called Agile planning tools or application lifecycle management (ALM) tools. Copado includes built-in ALM and also integrates with popular tools like Jira and Azure DevOps.

Scrum focuses mostly on communication and how to plan and execute work. But it’s powerful because it focuses on delivering discrete chunks of functionality in small periods of time and regularly reassessing which changes to make next.

A user story in Copado describing the business reasons for a requested change

Version Control

Praveen, the team’s architect, gets an urgent call from the customer service team about critical customizations that were overwritten in the last deployment. Praveen can identify the affected components, but he can’t tell what customizations were there previously.

After a few hours, he finds the person who wrote the original code. Eventually they resolve the issue, but the support team spends an entire morning manually inputting data. And Praveen loses a half day of work.

Life Without Version Control

Imagine how difficult life would be if we didn’t have a memory.

Because Praveen’s team doesn’t use version control, they have no history of what’s changing. That makes it difficult to debug issues. People accidentally overwrite each other’s changes and waste a lot of time re-creating work.

To cope with this, Praveen’s team follows these rules.

  • Try not to make big changes.
  • Never delete anything!
  • Never let more than one person work in parallel on the same thing.

Over time, their configuration has become far more complicated to understand and maintain, because their organization is complex and constantly changing.

They suspect many customizations are now out of date or unused. But it’s risky to delete or change things, because they can’t guarantee what will happen. It takes a long time to recover if something goes wrong, and it takes a long time to test before every release.

The Importance of Version Control

Having a history of changes in version control provides essential information for debugging and decision making. Version control tells you precisely what changed, why, when, by whom, and what else changed at the same time.  

In addition to making detective work easier, version control opens the door to more creativity and experimentation. It functions like the “undo” button, or the history in a word processing doc. You can experiment without fear, knowing you can always get back to the way things were.

Version control has been an essential part of software development for decades. The most popular version control tool is called Git, which you can learn about in the Git and GitHub Basics module.

Taking Git Snapshots of Your Orgs

Praveen wants a way to start tracking how his orgs are changing over time. He also wants a faster way of understanding his entire org right now.  

Salesforce metadata can contain millions of cross-references. Without an easy way to search across the full set of metadata, Praveen and his team spend many of their coding and debugging hours trying to trace the full set of relationships across metadata. The Salesforce Setup UI is very easy to use, but it’s designed to show only one component at a time.  

The Salesforce Metadata API provides a text representation of all your configuration. You can deploy changes between orgs, and search across all metadata. With version control, you can track changes to that metadata over time.

Git Snapshots

Even if some members of the team aren’t yet familiar with version control, you can get started right away by taking Git snapshots of your orgs.

Git snapshots are like backups of your metadata; you can run them on a regular schedule. You can write a script to take metadata backups, or you can use a Salesforce DevOps tool like Copado.

Praveen decides to set up a Git snapshot process to capture his production environment and schedules it to update every day. He also schedules snapshots of his team’s other environments. The development and testing sandboxes are at risk of overwritten changes, lost work, and unexpected differences, so tracking their history is also important.

Copado Git snapshot tool

Admin-Friendly Version Control

Git snapshots of your orgs are fantastic, but they only bring some of the benefits of version control.

Seeing what changed over time is important. But the real power of version control is in explaining who made the changes and why. Tracking a group of changes in version control is called making a commit. When you make a commit, you specify why you made the change, and refer to any relevant work tickets.

But because version control is managed outside Salesforce and can be complex, it can be daunting for click-based admins to adopt.

Praveen asks his colleague Li for advice. Li explains that when his team initially adopted version control, developers tracked changes on behalf of admins. This worked, but it slowed the team down and made admins dependent on the developers.

Li’s team trained some of their admins in version control, but they struggled to involve everyone.

Praveen and Li decide to use Copado to let admins track their own changes in version control, right from Salesforce. Copado hides complexity and automates tedious and error-prone processes like merging XML. Since it’s based on Salesforce, their admins learn how to use it in just minutes.

Grouping Changes by User Story

Joan’s team has gotten comfortable with using Copado for version control.

Anitha, one of the developers, tells Joan that the team is still doing tedious double-entry. They track their work in version control and in a spreadsheet. They use this spreadsheet to associate each set of metadata changes to the user story requesting that change.

Joan discusses this with Tony, the release manager. Tony explains how important it is to track every metadata change and which user story it’s associated with. This information tells him which pieces of metadata to deploy in the release at the end of the month.

Anitha points out that Copado allows them to directly tie version control changes to user stories. It puts a reference to the user story on each commit message in version control, and shows each commit on the user story record page.

Changes being committed to version control using Copado

Tying changes to user stories lets developers migrate metadata between different environments and update the user story status at the same time. Information like requirements and test results are stored on the user story, and the team can create deployments by simply selecting the user stories they wish to deploy. This helps business people and IT people stay aligned, another principle of the Agile Manifesto.

It also saves each developer several hours per month, and saves Tony from having to track down missing metadata before each release. He can shift his focus to coaching and reminding developers to use these tools.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities