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. |
One answer
Ralph Schoon (63.7k●3●36●47)
| answered Dec 14 '16, 8:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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
Ilona Krammer
commented Dec 14 '16, 8:19 a.m.
I don't want to set the work item ID - I want to use it as a unique number (which in some cases has to be changed, that's why it needs to be first duplicated into another attribute field and can then be adapted by the user if he needs to)
It would have to be a participant as far as I can tell, because the ID will only be available during the save. Default value provider are only of very limited use, as they lack a lot of information when called.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Please have a look at this similar question:
https://jazz.net/forum/questions/232064/calculated-value-script-not-returning-the-value
Read and tried those things but nothing worked unfortunately..
But then again for the moment I need to insert the work item ID which is not available until the item is saved so I'm guessing I don't really have a chance at solving that with a default value anyway - right?