Operational Participant referring to the the deleted attribute
Hi All,
I encountered a plugin which need to access an attribute and then does some stuff around that.
My case is I have an attribute which is an integer type as part of the requirement we need to modify it to use the enumeration so I deleted the existing attribute which is of type integer and then created anew attribute whose type is enum.
now MY plugin worked fine when it is using the Integer filed and now I change my code to access the new attribute but some how it is returning null.
to my surprise it is returning an object when I use the old attribute id (The workitem template is no more using that old attribute).
How the plugin is able to access a deleted attribute?
Thanks
Surender.
|
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Nov 17 '14, 5:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You can not reuse the ID with a different attribute type. You could have - if planned carefully - created a migration tool that translated the old number into an enumeration literal.
Secondly, enumerations are handled different from just an int number if it comes down to its values. See https://rsjazz.wordpress.com/2012/08/20/manipulationg-work-item-enumeration-values/ for some hints. In a server participant, I believe you would use IAuditableServer or IAuditableCommon rather than IAuditableClient, but the rest of the API should be pretty much the same. |
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
Workitems created before your change will still have the old attribute. Once created they cannot be deleted.
I`m not able to get the details of the new attribute Even when I tried it for the new work items which are using the new attribute.
a little more info please..
the IDs for the two attributes (old and new) are different, correct?
you cannot 'change' an attribute type.
the old attribute ID will still exist, because some the workitems have it. u cannot reuse the ID.