Copying subsystem field to subtask automatically

Hi

I want to create subtasks inside a parent task and automatically fill in the subsystem field. I found a built in workflow rule for this but when activating it for the project I get a message that configuration is needed.

 

However, the message is generic "one or more rules require additional setup in this project". So I have no idea what the problem is.

We're using youtrack in the cloud.

Thanks,

Thomas

0
5 comments
Avatar
Permanently deleted user
Official comment

Thomas,

Looks like your rule was modified by someone, as originally the requirement is the following:

    Subsystem: {
      type: entities.EnumField.fieldType
    }

It may work for ownedField, because ownedField is a kind of enum with additional properties, and this particular workflow doesn't required the owner property of the ownedField.

Avatar
Permanently deleted user

I now believe it to be due to incorrect requirement section

 

requirements: {
Subsystem: {
type: entities.enum.fieldType
},
SubtaskOf: {
type: entities.IssueLinkPrototype,
name: 'Subtask',
outward: 'parent for',
inward: 'subtask of'
}
}

 

 

It's a bit strange that the built in rule to update the subsystem field uses the enum type when the default type for the subsystem is the ownedField type. I did update the requirement section to require the type to be ownedField instead. But no change in the error message.

0
Avatar
Permanently deleted user

Hi, thanks for your reply.

 

That was probably me that messed up the code I was posting as I tried replace the EnumField with ownedField and then reverted back to enum.

 

I thought the names should come from here:

https://www.jetbrains.com/help/youtrack/standalone/Supported-Custom-Field-Types.html#enumerated-types

 

But I can see that the names of the fields in the requirements should not be the ones from the documentation? EnumField vs enum in the docs?

 

 

Anyway. I reverted the changes and it is still the same problem (which is the reason I stated editing in the first place). My workflow uses the default type of the subsystem which is the ownedProperty but I'm allowing more than one entry. Still has no idea how to make this play nice together.

0
Avatar
Permanently deleted user

Thomas,

Indeed, the names are different, and you may find the correspondence here: https://www.jetbrains.com/help/youtrack/incloud/requirements.html#requirements-properties.

As for the workflow issue, there is an additional property in requirements, which is 'multi': it is 'false' by default, meaning that the field accepts only one entry. For your case you need just to add the property to the requirement:

    Subsystem: {
      type: entities.EnumField.fieldType,
multi: true
}

 

1
Avatar
Permanently deleted user

I see!

 

Thanks for helping out. It seems to work now *thumbs_up* :)

0

Please sign in to leave a comment.