Skip to content

Conversation

@luisrosasx
Copy link

@luisrosasx luisrosasx commented Feb 9, 2026

  • Add baseMixin field to TaskType interface (plugins/task/src/index.ts)
  • Add @prop decorator for baseMixin in model (models/task/src/index.ts)
  • Modify mixin creation logic to use baseMixin when provided (plugins/task/src/utils.ts)
  • Add validateMixinHierarchy function for inheritance validation
  • Create MixinSelector.svelte component for UI selection
  • Add i18n strings for BaseMixin, BaseMixinDescription, NoBaseMixin

This allows TaskTypes to inherit attributes from existing mixins while maintaining backwards compatibility.

@huly-github-staging
Copy link

Connected to Huly®: UBERF-15459

- Add baseMixin field to TaskType interface (plugins/task/src/index.ts)
- Add @prop decorator for baseMixin in model (models/task/src/index.ts)
- Modify mixin creation logic to use baseMixin when provided (plugins/task/src/utils.ts)
- Add validateMixinHierarchy function for inheritance validation
- Create MixinSelector.svelte component for UI selection
- Add i18n strings for BaseMixin, BaseMixinDescription, NoBaseMixin

This allows TaskTypes to inherit attributes from existing mixins while maintaining backwards compatibility.

Signed-off-by: Luis Rosas <[email protected]>
@luisrosasx luisrosasx force-pushed the feature/tasktype-basemixin branch from d5b35ae to 54ce6fb Compare February 9, 2026 17:10
allowedAsChildOf!: Ref<TaskType>[] // In case of specified, task type is for sub-tasks

@Prop(TypeRef(core.class.Mixin), getEmbeddedLabel('Base Mixin'))
baseMixin?: Ref<Mixin<Task>> // Existing mixin to inherit attributes from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please fix validation errors here?
You can verify it locally by running rushx _phase:validate in the directory /models/task/.

"CloneExisting": "Clone existing",
"CloneTaskTypes": "Clone",
"SelectTaskTypesToClone": "Select task types to clone",
"NoTaskTypesAvailable": "No task types available to clone",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add translations for other languages as well?
Or I can add them later if it will be easier for you.

// Create new targetClass (mixin) that extends the source's targetClass
const sourceClass = client.getHierarchy().getClass(source.ofClass)
const newTargetClass = await client.createDoc(core.class.Class, core.space.Model, {
extends: source.targetClass, // Inherit from source's mixin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked what happens if you delete a source type after creating a target type?

@ArtyomSavchenko
Copy link
Member

Hi @luisrosasx
Thank you very much for your contribution.
I left a few comments, but I am ready to help with fixes if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants