Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes

Comments

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?



One answer

Permanent link
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

0 votes

Comments

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)

I guess I'm going to write a java extension to do that

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

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,121

Question asked: Dec 14 '16, 7:20 a.m.

Question was seen: 1,907 times

Last updated: Dec 14 '16, 8:32 a.m.

Confirmation Cancel Confirm