Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.
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
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2026-04-03

### Added
- Define task schema with all properties (title, description, status, priority, project, etc.)
- Define project schema with all properties (title, description, status, color, icon, members, etc.)
- Define column schema for kanban boards (title, project, order, wipLimit, color, type)
- Define timeEntry schema for time tracking (task, user, duration, date, description)
- Define label schema for categorization (title, color, description)
- Add seed data: 5 labels (Bug, Feature, Docs, Design, Infrastructure)
- Add seed data: 3 projects (Client Portal v2, Infrastructure Migration, Onboarding Automation)
- Add seed data: 12 columns (4 per project: To Do, In Progress, Review, Done)
- Add seed data: 5 tasks with realistic assignments and priorities
- Add seed data: 3 time entries referencing task seeds
- Register repair step for automatic schema import on app install/upgrade
- Bump register version to 0.2.0

### Changed
- Remove placeholder example schema from planix_register.json
- Remove example schema references from DeepLinkRegistrationListener
11 changes: 10 additions & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Vrij en open source onder de EUPL-1.2-licentie.

**Ondersteuning:** Voor ondersteuning, neem contact op via support@conduction.nl.
]]></description>
<version>0.1.0</version>
<version>0.2.0</version>
<licence>eupl</licence>
<author mail="info@conduction.nl" homepage="https://www.conduction.nl/">Conduction</author>
<namespace>Planix</namespace>
Expand Down Expand Up @@ -69,4 +69,13 @@ Vrij en open source onder de EUPL-1.2-licentie.
<admin>OCA\Planix\Settings\AdminSettings</admin>
<admin-section>OCA\Planix\Sections\SettingsSection</admin-section>
</settings>

<repair-steps>
<install>
<step>OCA\Planix\Repair\InitializeSettings</step>
</install>
<post-migration>
<step>OCA\Planix\Repair\InitializeSettings</step>
</post-migration>
</repair-steps>
</info>
9 changes: 9 additions & 0 deletions docs/features/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Planix — Features

Planix is a project management app for Nextcloud, providing kanban boards, task management, time tracking, and project organization.

## Features

| Feature | Summary | Standards | Doc |
|---------|---------|-----------|-----|
| Register Schemas | 5 schemas (task, project, column, timeEntry, label) with seed data for project management | OpenRegister v0.2.10+ | [register-schemas.md](register-schemas.md) |
36 changes: 36 additions & 0 deletions docs/features/register-schemas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Register Schemas

Defines and registers the complete Planix data model in OpenRegister.

## Overview

Planix uses OpenRegister to store its data model. The `planix_register.json` file defines 5 schemas and seed data that are automatically imported when the app is installed or upgraded.

## Schemas

- **task** — A work item with title, description, status, priority, assignee, dates, and labels
- **project** — A container for tasks with members, colors, and case references
- **column** — A kanban board column with WIP limits and ordering
- **timeEntry** — A time tracking record linked to a task
- **label** — A categorization tag with color coding

## Seed Data

Fresh installs include demo data:
- 5 labels: Bug, Feature, Docs, Design, Infrastructure
- 3 projects: Client Portal v2, Infrastructure Migration, Onboarding Automation
- 12 columns: 4 per project (To Do, In Progress, Review, Done)
- 5 tasks with realistic assignments
- 3 time entries

## Technical Details

- Schemas are defined in `lib/Settings/planix_register.json`
- Import is triggered by the `InitializeSettings` repair step (declared in `appinfo/info.xml`)
- `SettingsService::loadConfiguration()` reads the JSON, parses it, and calls `ConfigurationService::importFromApp()`
- Import is idempotent — re-running does not create duplicates
- Required fields are validated by OpenRegister (e.g., task requires `title` and `status`)

## Specs

- [register-schemas spec](../../openspec/specs/register-schemas/spec.md)
4 changes: 0 additions & 4 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
namespace OCA\Planix\AppInfo;

use OCA\Planix\Listener\DeepLinkRegistrationListener;
use OCA\Planix\Repair\InitializeSettings;
use OCA\OpenRegister\Event\DeepLinkRegistrationEvent;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
Expand Down Expand Up @@ -64,9 +63,6 @@ public function register(IRegistrationContext $context): void
listener: DeepLinkRegistrationListener::class
);

// Initialize register and schemas on install/upgrade.
$context->registerRepairStep(InitializeSettings::class);

}//end register()

/**
Expand Down
34 changes: 30 additions & 4 deletions lib/Listener/DeepLinkRegistrationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,39 @@ public function handle(Event $event): void
return;
}

// Register example object deep links.
// Update the register slug, schema slug, and URL template to match your app's actual schemas.
$event->register(
appId: 'planix',
registerSlug: 'planix',
schemaSlug: 'example',
urlTemplate: '/apps/planix/#/examples/{uuid}'
schemaSlug: 'task',
urlTemplate: '/apps/planix/#/tasks/{uuid}'
);

$event->register(
appId: 'planix',
registerSlug: 'planix',
schemaSlug: 'project',
urlTemplate: '/apps/planix/#/projects/{uuid}'
);

$event->register(
appId: 'planix',
registerSlug: 'planix',
schemaSlug: 'column',
urlTemplate: '/apps/planix/#/columns/{uuid}'
);

$event->register(
appId: 'planix',
registerSlug: 'planix',
schemaSlug: 'label',
urlTemplate: '/apps/planix/#/labels/{uuid}'
);

$event->register(
appId: 'planix',
registerSlug: 'planix',
schemaSlug: 'timeEntry',
urlTemplate: '/apps/planix/#/time-entries/{uuid}'
);

}//end handle()
Expand Down
31 changes: 30 additions & 1 deletion lib/Service/SettingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,37 @@ public function loadConfiguration(bool $force=false): array
}

try {
$configPath = __DIR__.'/../Settings/planix_register.json';
if (file_exists($configPath) === false) {
$this->logger->error('Planix: planix_register.json not found at '.$configPath);
return [
'success' => false,
'message' => 'Configuration file planix_register.json not found.',
];
}

$configContent = file_get_contents($configPath);
if ($configContent === false) {
$this->logger->error('Planix: failed to read planix_register.json');
return [
'success' => false,
'message' => 'Failed to read configuration file.',
];
}

$configData = json_decode($configContent, true);
if (json_last_error() !== JSON_ERROR_NONE) {
$this->logger->error('Planix: failed to parse planix_register.json: '.json_last_error_msg());
return [
'success' => false,
'message' => 'Failed to parse configuration file: '.json_last_error_msg(),
];
}

$configVersion = ($configData['info']['version'] ?? '0.0.0');

$configurationService = $this->container->get('OCA\OpenRegister\Service\ConfigurationService');
$result = $configurationService->importFromApp(appId: Application::APP_ID, force: $force);
$result = $configurationService->importFromApp(appId: Application::APP_ID, data: $configData, version: $configVersion, force: $force);

if (empty($result) === false) {
$this->logger->info('Planix: register configuration imported successfully');
Expand Down
Loading
Loading