It's all about the answers!

Ask a question

Is a Default Value or Calculated Value script supported for Subscribers attribute?

Daniel Reilly (1431319) | asked Feb 03 '13, 3:18 p.m.
I need to automatically add contributors to the subscribers attribute.  But, it can only be for certain types of work items, under certain conditions, in certain projects.  I have similar scripts for other built in attributes, but need some information on how to handle a user list with scripting, which I can't find.  Is this supported?

One answer

permanent link
Ralph Schoon (62.3k33643) | answered Feb 03 '13, 4:07 p.m.
edited Feb 03 '13, 4:23 p.m.

The Subscribers (similar to Attachments and Links) is not an attribute, as far as I can tell. It actualy is a collection of objects, at least from an API perspective. So, as far as I can tell, you can not modify the subscribers in JavaScript. You can find more information in, which includes references to the Wiki article about javaScript based customization. In that page, as far as I can tell, is no attribute ID for the subscribers.

You could manipulate subscribers in a Participent, similar to using the client API used in Other posts there show examples for Participants and links to the Extensions Workshop to learn how to set up your environment.

Daniel Reilly commented Feb 03 '13, 4:32 p.m.


There is an attribute definition for subscriptions, but a regular contributor UUID result from a script causes an exception:

 <attributeDefinition id="" name="Subscribed By" type="subscriptions">
    <dependsOn id="category"/>
    <dependsOn id="target"/>
    <defaultValueProvider providerId=""/>

!MESSAGE An internal error has occurred.
!STACK 0 Internal error
    ... more

Do you know what kind of result it is looking for?  And if there is a way to supply it via scripts?


Your answer

Register or to post your answer.