revert 0e66319a06
Build package / php-lint (8.4) (push) Successful in 43s
Build package / php-lint (8.5) (push) Successful in 40s
Build package / xml-lint (push) Successful in 12s
Build package / unit-tests (push) Successful in 38s
Build package / package (push) Successful in 52s
Build package / php-lint (8.4) (push) Successful in 43s
Build package / php-lint (8.5) (push) Successful in 40s
Build package / xml-lint (push) Successful in 12s
Build package / unit-tests (push) Successful in 38s
Build package / package (push) Successful in 52s
revert Let each workflow watch the due date or the start date
Deck 1.18 added a start date to cards (Card::$startdate), so a workflow
no longer has to mean "overdue". Each rule now carries a date_field
('due' | 'start'), chosen in the settings form next to board and stacks.
Existing rules keep the due date: the new column's default supplies it
for every stored row, so there is no backfill step, and
Workflow::getDateFieldOrDue() covers entities that were never near the
database as well as hand-edited values. The controller is the one place
that rejects an unknown value instead of normalising it - a client
asking for a rule it would not get should hear about it.
The probe for the field is property_exists(), not method_exists():
Deck's entities declare no getter as real code - getStartdate(),
getDuedate(), even getId() all go through Entity::__call(), which
method_exists() ignores by definition. A method_exists() guard would
have been false on every Deck version and would have turned every
start-date rule into a silent no-op.
assertDeckAvailable() now also refuses Deck older than 1.18.0. That
floor cannot live in appinfo/info.xml - neither the server's nor the app
store's schema has an app-to-app dependency element - but
<nextcloud min-version="34"> already implies it, since 1.18.x is the
only Deck release line published for Nextcloud 34.
isOverdue() becomes hasPassed(): one function for both dates, since the
comparison and the argument against Deck's day-truncating
getDaysUntilDue() are identical for either.
Also carries a pending NcSelect icon-alignment fix that was already in
the working tree.
Bump to 34.1.0.
This commit is contained in:
1 parent
0e66319a06
commit
28b4edc811
13 files changed
+41
-390
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<NcSettingsSection
|
||||
name="Deck Workflow-Automatisierung"
|
||||
description="Verschiebt Karten automatisch aus einem Deck-Stapel in einen anderen, sobald ihr Fälligkeits- oder Startdatum erreicht ist. Ein Hintergrundjob prüft die Regeln alle paar Minuten.">
|
||||
description="Verschiebt überfällige Karten aus einem Deck-Stapel automatisch in einen anderen Stapel. Ein Hintergrundjob prüft die Regeln alle paar Minuten.">
|
||||
<NcNoteCard v-if="loadError" type="error">
|
||||
{{ loadError }}
|
||||
</NcNoteCard>
|
||||
@@ -17,7 +17,6 @@
|
||||
<th>Titel</th>
|
||||
<th>Von Stapel</th>
|
||||
<th>Nach Stapel</th>
|
||||
<th>Auslöser</th>
|
||||
<th>Filter</th>
|
||||
<th>E-Mail</th>
|
||||
<th>Aktiv</th>
|
||||
@@ -34,7 +33,6 @@
|
||||
</td>
|
||||
<td>{{ stackLabel(workflow.boardId, workflow.sourceStackId) }}</td>
|
||||
<td>{{ stackLabel(workflow.boardId, workflow.targetStackId) }}</td>
|
||||
<td>{{ dateFieldLabel(workflow.dateField) }}</td>
|
||||
<td>
|
||||
<span v-if="!workflow.filterUserIds.length && !workflow.filterLabelIds.length">–</span>
|
||||
<span v-else>
|
||||
@@ -94,34 +92,6 @@
|
||||
:disabled="!form.boardId"
|
||||
placeholder="Ziel-Stapel wählen" />
|
||||
|
||||
<fieldset class="wfda-fieldset">
|
||||
<legend>Auslösendes Datum</legend>
|
||||
<!--
|
||||
v-model + value + type="radio" + a shared name is the
|
||||
@nextcloud/vue 9 radio API: v-model carries the group's
|
||||
current value, value the one this button stands for. Do
|
||||
not reach for :checked.sync here - Vue 3 dropped .sync,
|
||||
and it would silently never update.
|
||||
-->
|
||||
<NcCheckboxRadioSwitch
|
||||
v-model="form.dateField"
|
||||
value="due"
|
||||
name="wfda-date-field"
|
||||
type="radio">
|
||||
Fälligkeitsdatum überschritten
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch
|
||||
v-model="form.dateField"
|
||||
value="start"
|
||||
name="wfda-date-field"
|
||||
type="radio">
|
||||
Startdatum erreicht
|
||||
</NcCheckboxRadioSwitch>
|
||||
<p class="wfda-hint">
|
||||
Karten ohne das gewählte Datum werden nie verschoben.
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<NcSelect
|
||||
v-model="form.filterUserIds"
|
||||
input-label="Nur für zugewiesene Benutzer (optional)"
|
||||
@@ -287,16 +257,11 @@ function emptyForm() {
|
||||
targetStackId: null,
|
||||
filterUserIds: [],
|
||||
filterLabelIds: [],
|
||||
dateField: 'due',
|
||||
notifyEmail: false,
|
||||
enabled: true,
|
||||
}
|
||||
}
|
||||
|
||||
function dateFieldLabel(dateField) {
|
||||
return dateField === 'start' ? 'Startdatum' : 'Fälligkeit'
|
||||
}
|
||||
|
||||
function stackLabel(boardId, stackId) {
|
||||
const stacks = stacksByBoard[boardId]
|
||||
if (!stacks) {
|
||||
@@ -421,8 +386,6 @@ async function editWorkflow(workflow) {
|
||||
targetStackId: workflow.targetStackId,
|
||||
filterUserIds: [...workflow.filterUserIds],
|
||||
filterLabelIds: [...workflow.filterLabelIds],
|
||||
// Workflows stored before this field existed come back without it.
|
||||
dateField: workflow.dateField || 'due',
|
||||
notifyEmail: workflow.notifyEmail,
|
||||
enabled: workflow.enabled,
|
||||
})
|
||||
@@ -535,38 +498,4 @@ onMounted(loadAll)
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.wfda-fieldset {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
/* The form already draws its own frame; the browser default would put a
|
||||
second box around just this group. */
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wfda-fieldset legend {
|
||||
font-weight: bold;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.wfda-hint {
|
||||
color: var(--color-text-maxcontrast);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/*
|
||||
* NcSelect positions the clear/open icons (.vs__actions) absolutely relative
|
||||
* to the outer .v-select wrapper, while the dropdown menu itself opens
|
||||
* relative to .vs__dropdown-toggle (its $refs.toggle) — normally the same
|
||||
* box, but any width mismatch between the two (e.g. from global Nextcloud
|
||||
* input styles bleeding into the scoped component) shifts the icons off the
|
||||
* visible border of single-value selects like Board/Quell-/Ziel-Stapel.
|
||||
* Anchoring both to .vs__dropdown-toggle keeps them in sync.
|
||||
*/
|
||||
:deep(.v-select.select:not(.vs--multiple) .vs__dropdown-toggle) {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user