> For the complete documentation index, see [llms.txt](https://releaseowl.gitbook.io/releaseowl-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://releaseowl.gitbook.io/releaseowl-docs/releaseowl-user-guide/sap-btp/working-with-user-stories.md).

# Working with User Stories

A user story carries the change(s) to be delivered. How changes are attached depends on the branching model of each application involved.

### Add MTAR Applications

To associate MTAR applications with a User Story:

1. Navigate to **Change Management** and click **User Stories**.
2. Click **Create New User Story**.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FmTzVQXWKK2hbj6T0uaDS%2Fimage.png?alt=media&amp;token=184ae10d-8aae-468e-beb3-a39563870877" alt=""><figcaption></figcaption></figure>

2. Enter the required details and click **Create**.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FacStQuNORA8GcaAVMR2Z%2Fimage.png?alt=media&amp;token=2cf71e20-c6bb-4d7a-95aa-8cee98e5ac7f" alt=""><figcaption></figcaption></figure>

3. Click **Actions**, and then click **Edit**.
4. In the User Story section, the **Change Type** field displays two options:
   * **Normal**
   * **Hotfix**
5. Select the required change type.
6. **Normal:** The user story follows the standard release process. Branches are created and promoted using the application's regular branch configuration.

   **Hotfix:** The user story is used for urgent fixes. ReleaseOwl always assigns the **hotfix branch** to the user story. Promotion is carried out using the application's Hotfix configuration, so the fix can be delivered to production without waiting for the regular release.

{% hint style="info" %}
**Note:** Even if the application uses the Cherry-Pick model, a Hotfix user story works only with branches — you add branches to the user story, not individual commits.
{% endhint %}

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FZ3gZIs1fLTgM6x7kEmr5%2Fimage.png?alt=media&amp;token=a2822dcb-d94b-4c41-8a52-02214258d5ec" alt=""><figcaption></figcaption></figure>

7. In the **MTAR Applications** section, click **Add**.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FcqtXCEcyJo6pVQcYHbYc%2Fimage.png?alt=media&amp;token=7a170fa4-a089-49a5-b555-ea429b6d77ba" alt=""><figcaption></figcaption></figure>

**Step 1: MTAR Applications**

The **MTAR Applications** step displays all registered MTAR applications.

1. Select the required MTAR application.
2. Review the application details, including:
   * **Application Name**
   * **Description**
   * **Repository URL**
   * **Branching Model**
3. Click **Next**.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FJLvOIMs1TZBfVhS1r2Sm%2Fimage.png?alt=media&amp;token=aad7e86e-abcc-4af0-8410-da68f2ab1b03" alt=""><figcaption></figcaption></figure>

**Step 2: Source Reference**

When adding the application to a user story, the **Source Reference** step lets you either create a new feature branch or reference an existing one.

| Field             | Type     | Description                                                                                                                                                    |
| ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Select**        | Radio    | “Create \<Feature/Hotfix> Branch” to have ReleaseOwl create the branch in Git, or “I Already Have a \<Feature/Hotfix> Branch” to reference an existing branch. |
| **Branch name**   | Text     | The feature/hotfix branch name (e.g. hotfix/DP-488).                                                                                                           |
| **From Branch**   | Dropdown | The base branch the new branch is cut from. Defaults to the application’s “Create Feature Branch From Branch” value; can be overridden.                        |
| **Create Branch** | Button   | Creates the branch in the Git repository.                                                                                                                      |

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2F5uoGa8gjLFMpEGQqWgjE%2Fimage.png?alt=media&amp;token=8a06b4e3-8108-42d0-bc9a-9684cc27d748" alt=""><figcaption></figcaption></figure>

* If **I Already Have a Feature Branch** is selected, Enter  the existing feature branch and click **Finish**.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2Fmxn5DtwDdQ1iharqDUHU%2Fimage.png?alt=media&amp;token=76e6ea9c-2b7b-49a1-86fd-fb40e699e07f" alt=""><figcaption></figcaption></figure>

**Cherry Pick Model**

In the Cherry-Pick model no feature branch is created. Instead, you select the commits related to the user story. The available commits are populated from the application’s development branch — the landscape branch flagged as “**Development Branch**” . The selected commits are cherry-picked onto the target environment branches during promotion.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FaBzC3fJx23coUM8dmMyv%2Fimage.png?alt=media&amp;token=9736fdde-0adc-4272-90eb-8a6d4f83045f" alt=""><figcaption></figcaption></figure>

#### Step 3 — Source Reference (Hotfix Branch)

Because the change type is Hotfix, the Source Reference step works with a **hotfix branch**:

| Field             | Type     | Description                                                                                                                                                                          |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Select**        | Radio    | **Create Hotfix Branch** — ReleaseOwl creates the hotfix branch in the Git repository; or **I Already Have a Hotfix Branch** — reference a branch that already exists.               |
| **Hotfix Branch** | Text     | The hotfix branch name.                                                                                                                                                              |
| **From Branch**   | Dropdown | The dropdown lists the application's environment branches . For a production fix, select the branch running in production so the hotfix contains exactly what is live plus your fix. |

* Click **Finish** to create the hotfix branch and complete the assignment.
* If **I Already Have a Hotfix Branch** is selected, enter the existing hotfix branch name and click **Finish.**

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2F6R7AwW4rJlCJYzOTTFeR%2Fimage.png?alt=media&amp;token=780d173d-4fa3-465a-8855-1a3991c02156" alt=""><figcaption></figcaption></figure>

#### Edit Feature Branch / Commits

You can edit the **Feature Branch** or the selected **commits** after an MTAR application has been added to the User Story.

To edit the source reference:

1. In the **MTAR Applications** section, click the **Actions** button corresponding to the required MTAR application.
2. Click **Edit Feature Branch**.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FAz6h5FaMPFX8FwkVc3Nq%2Fimage.png?alt=media&amp;token=5314a5f8-de86-4402-a04e-ae48ec95fe60" alt=""><figcaption></figcaption></figure>

3. Update the **Feature Branch** (for the **Feature Branch Model**) or modify the selected **commits** (for the **Cherry Pick Model**).
4. Click **Save** /**Add** to apply the changes.

<div><figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FodQ0axEQywo98EmAjHkr%2Fimage.png?alt=media&amp;token=3ff0fce8-8b13-4249-85a1-b7205ce0c8c5" alt=""><figcaption></figcaption></figure> <figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FwgYLtyAJbI35NocUGuRc%2Fimage.png?alt=media&amp;token=eacc4fa4-8834-42b5-91eb-046f0160803b" alt=""><figcaption></figcaption></figure></div>

### User Story Actions

The following actions are available on the User Story toolbar:

* **Validate** – Validates the User Story against the configured target environment and generates a **Validation Report**.  Depending on the Release Pipeline and associated Build Pipeline configuration, the validation may include artifact validation, dependency and impact analysis, static code analysis, SonarQube analysis, ESLint validation, OPA5 test execution, and build verification.
* **Promote** – Promotes the User Story to the next stage in the release pipeline.
* **Save** – Saves the changes made to the User Story. Ensure that you click **Save** before clicking **Promote**.
* **Refresh** – Refreshes the User Story and reloads the latest information.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2Fk9PFL2E083Z0q9g08zIA%2Fimage.png?alt=media&amp;token=e894b7c8-e3cc-48ff-aa63-bc237968d83e" alt=""><figcaption></figcaption></figure>

* **Activity Log**- Click **Activity Log** to view the complete history of actions performed on the User Story.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2F6tyTCakMKVwJWmDEYmuT%2Fimage.png?alt=media&amp;token=f256c3d5-b75e-447f-9f99-1c6754a07f24" alt=""><figcaption></figcaption></figure>

* **Release Package Details**: Click **Release Package Details** to view the release package information associated with the User Story.&#x20;
* **Export User Story** : Click **Export User Story** to export the User Story details.&#x20;

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2F66ZyL4IXCgLTw3UuUWfz%2Fimage.png?alt=media&amp;token=305e5c0b-a975-400d-9d69-ddad1efdbea6" alt=""><figcaption></figcaption></figure>

### User Story promotion

•    Initiated manually from the user story.

•    Source is the story’s feature branch (Feature Branch model) or selected commits (Cherry-Pick model).

•    Each user story is processed individually. In the Feature Branch model the feature branch is merged into each environment branch as the story advances (Development → QA → Production), with the source constant and only the Target Environment changing per stage.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FJU5V0lPrETNFkBoX4cVB%2Fimage.png?alt=media&amp;token=7a0df22c-1b1b-4e24-a948-b0ad82fb5891" alt=""><figcaption></figcaption></figure>
