وصف الميزة:
أضافت Discourse ميزة “سير العمل” (Workflows) الجديدة، والتي تسمح لمسيري المنتديات بإعداد عمليات مخصصة معقدة بسهولة لتسهيل الصيانة أو تحسين منتدياتهم بطرق أخرى.
يرجى السماح باستخدام مدخلات الخطوات (step inputs) لتعيين قيمة الحقول من النوع المنطقي (Boolean) التي تم تعيينها يدوياً في خطوات “استدعاء سير العمل” (Call workflow).
السلوك الحالي:
لا يمكن تعيين قيمة الحقل من النوع المنطقي إلا بشكل ثابت (hardcoded) في إعدادات الخطوة عبر مفتاح تبديل:
خطوات إعادة إنتاج المشكلة:
قم بتسجيل الدخول إلى حساب منتديات Discourse بصلاحيات المسؤول، على موقع تمكّنت فيه ميزة “سير العمل” الجديدة.
افتح صفحة “سير العمل” (/admin/plugins/discourse-workflows/workflows).
انقر على زر “+ سير عمل جديد ”.
سيتم إنشاء سير عمل جديد.
انقر على زر + .
سيتم فتح لوحة “إضافة خطوة ”.
اختر التدفق > استدعاء سير العمل (Flow > Call workflow) من اللوحة.
سيتم إضافة خطوة “استدعاء سير العمل” إلى سير العمل.
انقر نقرًا مزدوجًا على خطوة “استدعاء سير العمل”.
سيتم فتح مربع حوار إعدادات الخطوة.
اختر “تعيين الحقول يدوياً ” (Map fields manually) من قائمة “الإدخال ” (Input) في مربع الحوار.
سيظهر قسم “الحقول ” (Fields) في مربع الحوار.
انقر على زر “+ إضافة حقل ” في مربع الحوار.
سيتم إضافة واجهة إعداد الحقل إلى مربع الحوار.
اختر “منطقي ” (Boolean) من قائمة “النوع ” (Type).
لا يمكن تعيين قيمة الحقل إلا بشكل ثابت في إعدادات الخطوة عبر مفتاح تبديل. وعلى عكس أنواع الحقول الأخرى، لا توجد طريقة لاستخدام مدخل لتعيين القيمة.
إصدار Discourse:
ba63d427fd88c5d83cb18695b16dbdbfad6fa834
إعجاب واحد (1)
شكرًا لك على التقرير @per1234 سيتم إضافته في
workflows-boolean-assignment-expressions ← workflows-boolean-expressions-followups
merged 11:08AM - 30 Jul 26 UTC
Stacked on `workflows-boolean-assignment-expressions` — only the last commit is … new. Meant as follow-ups to review together with (or fold into) that branch before it ships.
Previously, `BooleanControl` kept a local copy of the plain/dynamic value conversion (so fixes to `ExpressionWrapper`'s converters silently did not apply to booleans), the wrapper carried `@expressionMode`/`@modeItems`/`@onModeChange`/`@modeControlClass` override hooks that only this one control used, and the full-width control wrapper defeated FormKit's end-alignment — the plain toggle sat stranded mid-row with the mode switcher at the far edge.
This change folds the boolean conversion into `plainValueForModeToggle` beside the existing array handling (preserving the `={{ true }}` literal round-trip your tests pin down), removes the now-unused wrapper hooks, derives the switcher positioning in CSS from FormKit's own `form-kit__field-toggle` class instead of a component arg, and re-aligns the toggle flush to the field's end.
All the tests on the base branch pass unchanged except one assertion updated to the new positioning contract (`--toggle` class → rendered inside `form-kit__field-toggle`).
إشارة إلى @renato
6 إعجابات
تحديث سريع: عمل @renato على الأمر في نفس الوقت الذي عملت فيه، وانتهى بنا الأمر إلى وجود طلبين للسحب (PRs) لنفس الميزة .
main ← workflows-boolean-assignment-expressions
merged 05:04PM - 30 Jul 26 UTC
Boolean fields in manually mapped "Call workflow" inputs and in Set fields could… only be hardcoded with a switch, so step inputs could not drive them the way they drive every other field type.
This change enables expression mode for boolean assignment values, makes boolean toggles accept dropped variables like other expression-capable fields, and casts resolved values against an explicit true/false vocabulary.
Note: a boolean expression resolving to an unrecognized value ("maybe") now fails the step with a clear error instead of silently taking the false branch.
5 إعجابات
شكرًا جزيلاً لـ @zogstrip و@renato على السرعة في معالجة هذا الطلب!
شكر خاص لـ @zogstrip على تخصيص الوقت لنشر التحديثات هنا.
إضافة Workflows الجديدة مفيدة حقًا.
3 إعجابات
zogstrip
تم إغلاقه في
7 أغسطس 2026، 11:39ص
10
تم إغلاق هذا الموضوع تلقائيًا بعد 7 أيام من آخر رد. لم يعد الردود الجديدة مسموحًا بها.