# Features — promotions

Evidence date: 2026-10-06.

Source: `git@bitbucket.org:overdrive/promotions.git`, `master` at `f06ff39` (2026-08-28).

Status words mean:

- **Current** — present on `master` and reachable from the menu or from a button on a menu page.
- **Completed** — delivered in Git and still present, called out because a comment or commit treats it as a finished change.
- **In development** — committed on a branch that is not `master`.
- **Removed or unused** — file or menu entry exists, or a commit says it was removed, and the running path does not use it.
- **Unknown** — not enough evidence.

There is no features document in the source repository.

## Current

| Feature | What the user can do | Where |
|---|---|---|
| Windows login | Sign in with the IIS Windows identity against `mstUser` | `Index.aspx`, `App_Code/VB/SystemFunctions.vb` |
| Menu shell | Home, Activity, Planning, Promotions, My Brands, Audit Log, Logout | `Admin.Master` |
| Activity list | Filter by brand, channel, type, name, and status. Open a row. Mark inactive when allowed. | `Activity.aspx`, `Activity.aspx.vb` |
| Activity details | Create or edit name, type, brand, channel, active flag, and tags. Show `PR####`. | `ActivityDetails.aspx`, `ActivityDetails.aspx.vb` |
| Activity cascade | Changing an activity updates matching `dwfPromo` rows | `CascadeDwfPromoAfterActivityUpdate` |
| Planning grid | Monthly counts by rep manager for one activity and year. Page size 80. | `Planning.aspx`, `Planning.aspx.vb`, `PagedGridEdit.vb` |
| Planning save | Insert or delete `dwfPromo` rows to match the typed counts. Skip deletes when a customer is set. | `Planning.aspx.vb` `Save` |
| Campaign duration | Write one duration onto every matching promotion in the year | `SetCampaignDuration` |
| Promotions grid | Filter and edit segment, account, date, duration, rep, and rep manager. Page size 120. | `Promotions.aspx`, `Promotions.aspx.vb` |
| Promotion delete | Delete one `dwfPromo` row after a browser confirm | `gvPromotions_RowDeleting` |
| Excel export | Download the promotions grid, the planning grid, or the audit result as `.xlsx` | `Export` methods, ClosedXML |
| Excel import | Update account, date, and rep from `.xlsx` row 3 onward | `Import.aspx.vb`, reached from Promotions |
| Audit log | Search `logPromo`, cap 5,000, page size 100 | `AuditLog.aspx`, `AuditLog.aspx.vb` |
| My Brands | Assign active brands and a domestic region to a user | `MyBrands.aspx`, `MyBrands.aspx.vb` |
| Version footer | Shows `1.1.0` and `17 June 2026`, plus `[Dev]` or `[Live]` | `Admin.Master.vb` |
| Environment connection | Superbowl connection from `.env` or process environment, not from `Web.config` | `SecureConfig.vb`, `.env.example` |

## Completed (still in the product)

These are changes the commits and comments describe as done. They are the current behaviour, not a separate mode.

| When | Change | Evidence |
|---|---|---|
| Comment dated 2012-07-20 | Audit log `logPromo` | `Admin.Master.vb` version comment; `ProjectFunctions.WriteLogPromo` |
| Comment dated 2012-09 | Import | `Import.aspx.vb` header |
| Comment dated 2015-01-15 | `strDuration` and `strRep` | Same header; still saved on the promotions grid |
| 2021-04 to 2021-06 | Start and end month required; rep manager column and filter; activity-type filter | Commit messages and comments in `Promotions.aspx.vb` |
| 2021-10-29 | Promotions tab sorting | `eb620a7` |
| 2025-11-27 | Activity menu, list, and details; `.xls` replaced by `.xlsx` | `75662bf` |
| 2025-12-04 | Promotion id label; activity names depend on the status filter | `6f0b416` |
| 2026-02-11 | `strTags` on `promoActivity` | `DB_Scripts/Database_Migration_ActivityDetails_Tags.sql`, `f43ac78` |
| 2026-02 | Item 3 schema and 2025 activity migration scripts | `Database_Migration_Item3_Phase1.sql`, `Phase2.sql` |
| 2026-06-23 | Status and activity-name filters moved left | `186569a` |
| 2026-07-21 | Mark Inactive only when the row is active; audit query capped and paged | `8e08934` |
| 2026-08-28 | Activity and import refactors merged as pull request #1 | `f06ff39` |

## In development (not on master)

Branch `#112_Promo-Planner-bugfixes` at `6b06854` (2026-09-14) is one commit ahead of `master`. It is not an ancestor of `master`.

| Change | Files |
|---|---|
| Empty Excel account, date, and rep cells keep the database value | `Import.aspx.vb` |
| Blank posted promotion fields keep the existing value | `Promotions.aspx.vb` |
| Promotions postback maps form fields using the PromoIDs of the page that was actually shown | `PagedGridEdit.vb`, `Promotions.aspx.vb` |

Whether this branch should be merged is **Unknown / Requires Confirmation**.

## Removed or unused

| Item | Evidence | Status |
|---|---|---|
| Activity row delete | Comment in `Activity.aspx.vb`: "Delete functionality removed per requirements." No delete control on the grid. | **Removed** from the activity list. The written requirement is not in the repository. |
| Home forecast report | The `Branding` report call in `Home.aspx.vb` is commented out. `Branding.vb` still contains the QF grid code and is still constructed from Planning and Promotions (grid colouring, and a customer-region update in the constructor). | Report display **removed** from Home. Class **still compiled**. |
| Planning module | Commit `32ffa18` (2026-03-27) message is "PLANNING MODULE \| REMOVAL". `Planning.aspx` is on the menu in `f06ff39` and save logic is present. | **Unknown / Requires Confirmation** what that commit removed. Planning is **current**. |
| Sandbox | Menu item `zSandbox.aspx` is not selectable. The page file is absent. Hidden unless `strUserGroup = "Dev"`, and even then it cannot be selected. | **Unused** |
| `Account/Login.aspx`, Register, Change Password, `Site.Master` | Visual Studio template ("My ASP.NET Application"). `Web.config` authentication is Windows. Membership connection `ApplicationServices` is not defined. Not linked from `Admin.Master`. | **Unused** by the promotions menu. Whether a bookmark still opens them is **Unknown**. |
| Jet OLE DB `.xls` reader | `getExcelDataSet` remains in `Import.aspx.vb`. The upload path calls `getExcelDataSetXlsx` only. | **Unused** by the button |
| `sql_insert_BrandQF_Job` | Inserts `sysCronJob`. No page calls it. | **Unused** by this site's pages |
| TFS 11 build XAML | `BuildProcessTemplates/*.xaml` | **Present**. No pipeline calls them from this repo. |
| Filesystem publish to `C:\Users\PJ\Desktop\pm` | `My Project/PublishProfiles/Profile1.pubxml` | **Present**. Not evidence of a shared deploy. |
| Sonar scanner files | Named in the 2026-09-28 onboarding scan. Not in Git history. | **Absent** from the repository |

## Planned

No issue list, roadmap, or TODO file defines future work.

The only unmerged product change found in Git is `6b06854`, described above.

Phase 1 of the Item 3 script leaves the foreign key `FK_dwfPromo_promoActivity` commented out, with a note to add it after data migration. That is a script instruction, not proof that anyone still plans to run it. **Unknown / Requires Confirmation.**

## Recently changed

Relative to the onboarding scan, which saw local `master` at `6f0b416` (2025-12-04):

- Activity and audit pages were refactored (`0b9deb1`, `8e08934`).
- Planning save and "unable to add promotions" fixes landed (`0c0a231`, `9dbbfdf`).
- Security-enhancement commit `bbeb55e` (2026-04-16) is on `master`. `Web.config` in `f06ff39` still has `customErrors mode="Off"` and trace written to the page.
- Pull request #1 merged on 2026-08-28.
- `6b06854` (2026-09-14) is the newest commit in the repository and is not on `master`.
