Script based default value for integer
So I thought I was trying something simple but somewhere I obviously went wrong.
What I want is set an attribute to a default value (tried any number but want work item ID actually)
- I created a script based default value and used the example, only changing the return value to an actual number during my tests
- switched to "types and attributes" and set the default value to the script based value
saved and tried and - nothing! it simply doesn't react! When trying to debug it, it doesn't even seem to use the default value at all.
the process configuration says I have the value provider set so I'm really not even sure where to start to look why this doesn't work. If I use a simple number default value everything works fine.
What I want is set an attribute to a default value (tried any number but want work item ID actually)
- I created a script based default value and used the example, only changing the return value to an actual number during my tests
- switched to "types and attributes" and set the default value to the script based value
saved and tried and - nothing! it simply doesn't react! When trying to debug it, it doesn't even seem to use the default value at all.
the process configuration says I have the value provider set so I'm really not even sure where to start to look why this doesn't work. If I use a simple number default value everything works fine.
One answer
You can not set the work item ID. That is basically a key and generated by the system. See this project for a potential solution to generate unique custom numbers that can be set in a custom attribute: Extension to generate unique custom work item numbers
Comments
Miguel Tomico
Dec 14 '16, 7:48 a.m.Ilona Krammer
Dec 14 '16, 8:16 a.m.