It's all about the answers!

Ask a question

Populate few parent attribute values into manual created child


kavita herur (5875080) | asked Sep 30 '13, 7:56 a.m.
edited Sep 30 '13, 7:57 a.m.

Hi All,

Can I assign data from parent to few attributes of child. I know that its possible from pre- conditions/ follow up conditions(server extensions) on save operation.

This works fine in case of auto generated child which may be created on state/attrbute change in parent.

 I want to create manual child work ticket  Is it possible to get few data populated from parent as default value to child before save.  If Yes, then On what operation need to create extensions.

Thanks,

Kavita

One answer



permanent link
Ralph Schoon (55.4k23642) | answered Sep 30 '13, 9:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 30 '13, 9:13 a.m.
Kavita,

there is no way using JavaScript. Although you can create Java based Attribute customization as described in http://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ , I am not completely sure if that can provide you with the API you need. Also, the question is when this gets triggered. A calculated value only gets triggered if the dependent attribute changes. Since a parent link is a link and not an attribute I doubt that would trigger the customization.

Default values are only triggered on creation of the element. Since when you create a work item, there is no parent link yet, and a lot of other data is not yet available, default values are limited in what they can do.

Nevertheless, a participant could do what you want, to some extend. Just not on creation. You could provide an advisor that prevents from saving if there is no parent. You can provide a participant that enters the values on the first save. The participant would look at the new reference to the parent.

You should not attempt to use the advisor because of http://rsjazz.wordpress.com/2012/12/14/do-not-modify-the-triggering-element-in-an-operationadvisor/ and I also don't see the advantage, an advisor works on save as well.

Worst case you can enter a specific state that you have to get over and requires the data.

One question for me would, how do you know you need a parent work item?


Your answer


Register or to post your answer.