Marketing · Activity list & duplication
Lists the centre’s marketing activities with type, segment, date range and status (planned / active / finished / closed), and offers edit, duplicate, delete and — for finished activities — the report view.
| Area | Marketing |
| Routes | marketing.campaigns · marketing.campaigns.index |
| Centre modules | marketing |
| Staff levels | root · admin · manager · crmmanager · weboperator · content_creator · owner |
| Models | campaign · campaignrule |
| UI label | title.header.marketing.campaigns / menu.navbar.marketing.campaign.index |
| Coverage | 4 use cases · 1 happy · 4 failure |
Known issues (2)
- 🟠 Medium — [[R07 · campaign canDelete compares a role to a status|campaign#canDelete compares a role to a status]]
- ⚪ Info — Activity duplicate uses proposal wording
How it works
Status drives almost every permission: canEdit lets root/admin edit anything but restricts manager/scmanager/weboperator/content_creator to activities that are not closed or finished; canDelete similarly protects closed and finished activities from everyone but root/admin; canShow (the report) is only available once the status is finished. canEditRaffle additionally blocks structural edits once any raffle rule has issued tickets. Duplication reuses the proposal-duplication copy keys (cms.proposals.proposal-duplicated). The Activities menu entry declares disabledByModule: 'MarketingAnalytics', so it disappears for centres with the marketing-analytics module even though the routes still work.
Use cases
Why someone opens this (4)
- Finding last year’s Christmas activity and duplicating it as the starting point for this year.
- Reviewing which activities are currently running across the centre.
- Opening the report of a finished activity to report results to the centre’s owners.
- Preventing a colleague from editing a closed activity whose results are already reported.
Path map
flowchart LR F(["Activity list and duplication"]):::feat F --> H1["Activity duplicated"]:::ok F -.-> X1["Duplication fails"]:::bad F -.-> X2["Edit blocked by status"]:::bad F -.-> X3["Delete blocked by status"]:::bad F -.-> X4["Report unavailable"]:::bad classDef feat fill:#b0432c,stroke:#b0432c,color:#ffffff,font-weight:bold classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13
Happy paths
Activity duplicated
- User finds a past activity and clicks duplicate.
- A copy is created and
cms.proposals.proposal-duplicatedconfirms it.- The user opens the copy, adjusts dates and content and saves.
Failure paths
Duplication fails
Cause — API error while copying the activity and its rules.
What happens —
cms.proposals.proposal-duplicated-error(‘Error on duplicating proposal’) — reusing the proposal wording for an activity is a copy bug that will confuse users.
Edit blocked by status
Cause — Activity is closed or finished and the role is not root/admin.
What happens —
canEditis false, so the action is hidden.
Delete blocked by status
Cause — Same as above for
canDelete.What happens — Action hidden. Note the
canDeletecondition checksCONTENT_CREATORagainstmodel.status, comparing a role constant to a status value — a latent logic bug that makes the guard weaker than intended.
Report unavailable
Cause — Activity is not yet
finished.What happens —
canShowfalse; the report link is not rendered.
QA checklist
Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.
- ✅ Activity duplicated
- ⛔ Duplication fails
- ⛔ Edit blocked by status
- ⛔ Delete blocked by status
- ⛔ Report unavailable
Implementation
app/controllers/marketing/campaigns/index.jsapp/routes/marketing/campaigns/index.jsapp/enums/campaign-status.jsapp/enums/campaign-types.jsapp/abilities/campaign.js
Translation keys (11)
Key English title.header.marketing.campaignsActivities menu.navbar.marketing.campaign.indexActivities marketing.new-campaignNew activity campaigns.copyCopy of campaigntypeActivity type campaign.status.plannedPlanned campaign.status.activeActive campaign.status.finishedFinished campaign.status.closedClosed cms.proposals.proposal-duplicatedThe proposal has been duplicated successfully cms.proposals.proposal-duplicated-errorError on duplicating proposal
Related
- Same area — Activity editor (loyalty mechanics, rules & targeting) · Activity report & PDF · Activity campaigns (programme grouping) · Email campaign list, duplication & stop · Email campaign builder (wizard, A-B test, scheduling) · Digital games (lottery) · Fidcard · Present cards (Fideliza gift cards) · Book appointment
- Shares data with — Customer create & edit · Customer CSV import · Customer receipts tab & ticket-stamp generation · Customer loyalty — raffle tickets · Customer loyalty — cards & stamps · Customer loyalty — rewards · Receipt verification queue · Store create & edit
Generated from doc/feature-inventory.json · id marketing-campaign-list · commit 276788ca6