Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Each release lists **Upgrade notes** when an install needs action beyond the ste
- **Appearance**: light, dark or system theme and an accent colour per user.
- **Per-user export column layouts** on top of the administrator's default.
- **Tags** for the backlog, with inline create and merge.
- **Custom field positions**: a project's custom fields can be placed anywhere on the task form (after Title, Description, Attachments, or after any field in the right panel, such as Status, Module or Developer), with an order number within each position. Existing fields stay at the bottom of their section until moved.
- **Two-factor sign-in** with any authenticator app (TOTP), turned on per user under My profile → Security: QR-code setup, ten one-time recovery codes, an optional "don't ask again on this device" (`Authentication:TwoFactor:RememberDeviceDays`, default 30), and administrator reset on the user's page. `Authentication:TwoFactor:RequireForAdministrators` (off by default) makes it mandatory for administrators who sign in with a password. Single sign-on users are not asked, since their identity provider handles it. See [docs/two-factor.md](docs/two-factor.md). ([#12](https://github.com/Taskist/taskist/issues/12))
- **Single sign-on with OpenID Connect** (`Authentication:Oidc`, off by default): Keycloak, Authentik, Entra ID, Google, Okta and other providers. Existing users are linked by verified e-mail; optional account creation on first sign-in (*Registered* role only), optional group → role mapping (adds roles only), and an SSO-only mode that keeps password sign-in for administrators at `/Login?local=1`. Linked sign-ins are listed under My profile → Security and on the user's admin page. See [docs/sso.md](docs/sso.md). ([#11](https://github.com/Taskist/taskist/issues/11))
- **Optional Sentry error tracking** (`Sentry:Enabled` + `Sentry:Dsn`, off by default): unhandled exceptions and logged errors, with request bodies, cookies, query strings, auth headers and personal data filtered out.
Expand All @@ -34,9 +35,11 @@ Each release lists **Upgrade notes** when an install needs action beyond the ste
- Seed data moved from the install wizard to four idempotent scripts in `sql-scripts/`: schema, defaults, translations and optional sample data. A fresh install now also gets the email templates, using an inactive placeholder email account.
- Docker images target .NET 10; the migrate container runs `sql-scripts/02`–`04`.
- E-mails fill `%company%` from **Configuration → Settings → Company name** (falls back to "Taskist").
- Custom fields: checkbox and radio fields now have a label and save on the edit page, every field saves when changed (previously only mandatory ones did), dropdowns start empty instead of preselecting the first option, a field without a translation shows its label instead of its resource key, and values typed on Create are kept when the form returns with an error.

### Security

- Saving a single custom field value (`Backlog/UpdateCustomField`) now requires edit rights on the task, like the rest of the task form.
- Wiki reads (content, tree, history, linked tasks, Word export) are limited to members of the page's project; previously any signed-in user could read any project's pages by id. Restoring a version now requires the version to belong to the page, and pages and folders can no longer be moved into another project or into their own sub-folders.
- Wiki images are recorded against their page's project at upload and served only to the uploader and that project's members; previously any user with the Wiki permission could fetch any stored image (including other projects' wiki images, profile photos and unsaved task uploads) by id.
- Task attachments are access-checked on download, upload and delete, uploads require the antiforgery token, and files are served as downloads with `nosniff`.
Expand Down
29 changes: 29 additions & 0 deletions sql-scripts/01_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2093,3 +2093,32 @@ END;
COMMIT;
GO

BEGIN TRANSACTION;
IF NOT EXISTS (
SELECT * FROM [__EFMigrationsHistory]
WHERE [MigrationId] = N'20261113050423_AddCustomFieldSlot'
)
BEGIN
ALTER TABLE [CustomField] ADD [DisplayOrder] int NULL;
END;

IF NOT EXISTS (
SELECT * FROM [__EFMigrationsHistory]
WHERE [MigrationId] = N'20261113050423_AddCustomFieldSlot'
)
BEGIN
ALTER TABLE [CustomField] ADD [Slot] int NULL;
END;

IF NOT EXISTS (
SELECT * FROM [__EFMigrationsHistory]
WHERE [MigrationId] = N'20261113050423_AddCustomFieldSlot'
)
BEGIN
INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
VALUES (N'20261113050423_AddCustomFieldSlot', N'10.0.13');
END;

COMMIT;
GO

30 changes: 27 additions & 3 deletions sql-scripts/03_locale.sql
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,25 @@ FROM (VALUES
(N'BacklogFilter.ShowInactive', N'Show inactive'),
(N'BacklogFilter.Stale', N'Stale: 7+ days in the same status'),
(N'BacklogFilter.StatusDaysMin', N'In current status for at least (days)'),
(N'BacklogFormSlot.Group.Main', N'Main column'),
(N'BacklogFormSlot.Group.Status', N'Right panel'),
(N'BacklogFormSlot.MainAfterAttachments', N'After Attachments'),
(N'BacklogFormSlot.MainAfterDescription', N'After Description'),
(N'BacklogFormSlot.MainAfterTitle', N'After Title'),
(N'BacklogFormSlot.MainBottom', N'Bottom of the main column'),
(N'BacklogFormSlot.StatusAfterDeveloper', N'After Developer'),
(N'BacklogFormSlot.StatusAfterDueDate', N'After Due date'),
(N'BacklogFormSlot.StatusAfterModule', N'After Module'),
(N'BacklogFormSlot.StatusAfterPriority', N'After Priority'),
(N'BacklogFormSlot.StatusAfterProject', N'After Project'),
(N'BacklogFormSlot.StatusAfterRelease', N'After Release'),
(N'BacklogFormSlot.StatusAfterReporter', N'After Reporter'),
(N'BacklogFormSlot.StatusAfterStartDate', N'After Start date'),
(N'BacklogFormSlot.StatusAfterStatus', N'After Status'),
(N'BacklogFormSlot.StatusAfterSubModule', N'After Sub-module'),
(N'BacklogFormSlot.StatusAfterTaskType', N'After Type'),
(N'BacklogFormSlot.StatusAfterTester', N'After Tester'),
(N'BacklogFormSlot.StatusBottom', N'Bottom of the right panel'),
(N'BacklogGrid.Age', N'Age'),
(N'BacklogGrid.AgeHelp', N'<strong>12d · 4d</strong> = open for 12 days · 4 days in the current status.<br/>Sort ▼ oldest first, ▲ newest first. Closed tasks show – and are always listed last.'),
(N'BacklogGrid.Assignee', N'Developer'),
Expand Down Expand Up @@ -347,13 +366,17 @@ FROM (VALUES
(N'Confirmation.Delete', N'Are you sure you want to delete?'),
(N'CustomField.Title', N'Custom Field'),
(N'CustomFieldGrid.ColumnClass', N'Column Width'),
(N'CustomFieldGrid.DisplayOrder', N'Order'),
(N'CustomFieldGrid.FieldType', N'Type'),
(N'CustomFieldGrid.Label', N'Label'),
(N'CustomFieldGrid.Mandatory', N'Mandatory'),
(N'CustomFieldGrid.Placement', N'Placement'),
(N'CustomFieldGrid.ResourceKey', N'Resource Key'),
(N'CustomFieldGrid.Slot', N'Position'),
(N'CustomFieldModel.ColumnClass', N'Column Width'),
(N'CustomFieldModel.ColumnClass.RequiredMsg', N'Column width is required'),
(N'CustomFieldModel.DisplayOrder', N'Order'),
(N'CustomFieldModel.DisplayOrder.Hint', N'Order within the chosen position: lower numbers come first. Fields without a number follow the numbered ones.'),
(N'CustomFieldModel.DisplayOrder.RangeMsg', N'Order must be between 0 and 9999'),
(N'CustomFieldModel.FieldType', N'Type'),
(N'CustomFieldModel.FieldType.RequiredMsg', N'Type is required'),
(N'CustomFieldModel.Label', N'Label'),
Expand All @@ -362,10 +385,11 @@ FROM (VALUES
(N'CustomFieldModel.Label.UniqueMsg', N'Label already exists'),
(N'CustomFieldModel.Mandatory', N'Mandatory'),
(N'CustomFieldModel.Options', N'Options (coma seperated)'),
(N'CustomFieldModel.Placement', N'Placement'),
(N'CustomFieldModel.Placement.RequiredMsg', N'Placement is required'),
(N'CustomFieldModel.ResourceKey', N'Resource Key'),
(N'CustomFieldModel.ResourceKey.RequiredMsg', N'Resource key is required'),
(N'CustomFieldModel.Slot', N'Position'),
(N'CustomFieldModel.Slot.Hint', N'Where the field appears on the task form, between the built-in fields.'),
(N'CustomFieldModel.Slot.RequiredMsg', N'Position is required'),
(N'Dashboard.AllProjects', N'All Projects'),
(N'Dashboard.AssigneeWorkload', N'Assignee Workload'),
(N'Dashboard.CreatedVsResolved', N'Created vs Resolved'),
Expand Down
57 changes: 57 additions & 0 deletions src/Libraries/Taskist.Core/Common/CustomFieldLayout.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using Taskist.Core.Domain.Masters;
using Taskist.Core.Enums;

namespace Taskist.Core.Common;

public static class CustomFieldLayout
{
#region Fields

private const int StatusSectionStart = 100;

#endregion

#region Methods

public static BacklogFormSlot ResolveSlot(int? slot, int placement)
{
if (slot.HasValue && Enum.IsDefined(typeof(BacklogFormSlot), slot.Value))
return (BacklogFormSlot)slot.Value;

return placement == (int)CustomFieldPlacement.StatusSection
? BacklogFormSlot.StatusBottom
: BacklogFormSlot.MainBottom;
}

public static CustomFieldPlacement SectionOf(BacklogFormSlot slot)
{
return (int)slot >= StatusSectionStart
? CustomFieldPlacement.StatusSection
: CustomFieldPlacement.MainSection;
}

public static bool RendersInsideStatusRow(BacklogFormSlot slot)
{
return SectionOf(slot) == CustomFieldPlacement.StatusSection && slot != BacklogFormSlot.StatusBottom;
}

public static IList<CustomField> Order(IEnumerable<CustomField> fields)
{
return (fields ?? [])
.Where(x => x != null)
.OrderBy(x => (int)ResolveSlot(x.Slot, x.Placement))
.ThenBy(x => x.DisplayOrder ?? int.MaxValue)
.ThenBy(x => x.Id)
.ToList();
}

public static IReadOnlyList<BacklogFormSlot> SlotsIn(CustomFieldPlacement section)
{
return Enum.GetValues<BacklogFormSlot>()
.Where(x => SectionOf(x) == section)
.OrderBy(x => (int)x)
.ToList();
}

#endregion
}
4 changes: 4 additions & 0 deletions src/Libraries/Taskist.Core/Domain/Masters/CustomField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public class CustomField : BaseEntity, IAuditableEntity

public int Placement { get; set; }

public int? Slot { get; set; }

public int? DisplayOrder { get; set; }

public virtual Project Project { get; set; }
}
}
22 changes: 22 additions & 0 deletions src/Libraries/Taskist.Core/Enums/BacklogFormSlot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Taskist.Core.Enums;

public enum BacklogFormSlot
{
MainAfterTitle = 10,
MainAfterDescription = 20,
MainAfterAttachments = 30,
MainBottom = 40,
StatusAfterProject = 110,
StatusAfterStatus = 120,
StatusAfterModule = 130,
StatusAfterSubModule = 140,
StatusAfterTaskType = 150,
StatusAfterPriority = 160,
StatusAfterReporter = 170,
StatusAfterDeveloper = 180,
StatusAfterTester = 190,
StatusAfterStartDate = 200,
StatusAfterDueDate = 210,
StatusAfterRelease = 220,
StatusBottom = 230
}
Loading
Loading