Convert between different Field Types
Hey guys,
we have a project where people choose criterias from fields (they range from 0-3) and I wanted to create a workflow that calculates a weighted result depending on these values.
As I read here http://forum.jetbrains.com/thread/YouTrack-1406 one can not convert between different field types in the workflow editor. However I need to have the enum value as integer, otherwise I can't do any calculations.
My new idea was to have an integer field instead of the enum field. The problem is that the values that have already been input into the enum field should be kept.
Unfortunately I only found a way to convert between type[1] and type[*]
So my question is (how) can I convert between enum and integer field keeping the values?
Cheers,
Marc
we have a project where people choose criterias from fields (they range from 0-3) and I wanted to create a workflow that calculates a weighted result depending on these values.
As I read here http://forum.jetbrains.com/thread/YouTrack-1406 one can not convert between different field types in the workflow editor. However I need to have the enum value as integer, otherwise I can't do any calculations.
My new idea was to have an integer field instead of the enum field. The problem is that the values that have already been input into the enum field should be kept.
Unfortunately I only found a way to convert between type[1] and type[*]
So my question is (how) can I convert between enum and integer field keeping the values?
Cheers,
Marc
Please sign in to leave a comment.
schedule rule convert string to integer yearly on September, 17 at 10:00:00 [<expression>] { applyCommand("new_integer_field " + Type, project.getUser("root")); }Please try it on a test environment first.
As a workaround you can turn off the mail server in settings, make changes and turn it back on in several minutes.
Another workaround is to create a simple stateless and change the Priority by the command e.g. 'Priority Critical' in the Command Window under the project admin silently:
rule convert when Priority.changed { var root = project.getUser("root"); for each myIssue in root.getIssues(Everything, "") { myIssue.applyCommand("new_integer_field" + Type, root); } }I suppose no one notification should be sent.