Default Dashboard Mementos
Accepted answer
Hi Carson,
You can prime the viewlet title in a process specification template using the "title" attribute on the "viewlet" element.
This works for all viewlet types.
For instance, the default title for the Feeds viewlet is "News Feed" which we override with "Jazz News":
<viewlet title="Jazz News" id="com.ibm.team.dashboard.viewlets.web.feed">
<preference id="url" value="http://jazz.net/pub/community/news/feed.rss?externalize=true"/>
</viewlet>
Unfortunately, the viewlet memento format differs depending on the viewlet type and is regarded as an internal implementation detail. As a result, the format isn't documented for the majority of our viewlets - even though it probably should be in order to support users who are configuring dashboard templates in the process.
Also, most viewlets don't even make use of mementos; but, rather rely on viewlet preferences or common viewlet definition attributes (such as "title"). The "Plan View" viewlet falls into this category - it only uses viewlet preferences to store it's data.
Viewlet data is stored as part of the dashboard resource and that data is virtually identical to what you would need to provide in a dashboard template in a process specification.
To eliminate the guess-work as to what data & format (preferences, mementos) a viewlet is specifying / utilizing, do the following steps:
(1) Create an empty dashboard
(2) Turn off auto-save
(3) Add and configure the viewlet you are interested in adding to a dashboard template
(4) Open Firebug on Firefox & switch to the Net tab (or "Network" tab in "Developer Tools" on Chrome)
(5) Save the dashboard
=> You will see an HTML PUT request simlar to the following
https://jazz.net/jts/dashboards/9137?contentType=application%2Frdf%25xml
(6) Inspect the HTTP request payload to find the data persisted for the widget
e.g. HTML Viewlet
<jw:Widget rdf:nodeID="_1">
<dc:type>com.ibm.team.dashboard.viewlet</dc:type>
<jw:definition rdf:resource="https://jazz.net/jts/viewlet/com.ibm.team.dashboard.viewlets.web.static"/>
<dc:title>HTML</dc:title>
<jw:icon rdf:resource="https://jazz.net/jts/jfs/RegistryImage/com.ibm.team.dashboard.viewlets.web/graphics/static/icons/html.gif"/>
<jw:memento>{"html":"test\n"}</jw:memento>
</jw:Widget>
e.g. Plan View Viewlet
<jw:Widget rdf:nodeID="_1">
<dc:type>com.ibm.team.dashboard.viewlet</dc:type>
<jw:definition rdf:resource="https://jazz.net/jazz/viewlet/com.ibm.team.apt.web.ui.internal.viewlet.PlansViewlet"/>
<dc:title>Ranked List</dc:title>
<jw:icon rdf:resource="https://jazz.net/jazz/jfs/RegistryImage/com.ibm.team.apt.web.ui/resources/internal/page/images/iteration_plan_default.gif"/>
<jw:preferences rdf:parseType="Collection">
<jw:Preference>
<jw:name>_scopeItem</jw:name>
<jw:value>_1w8aQEmJEduIY7C8B09Hyw</jw:value>
</jw:Preference>
<jw:Preference>
<jw:name>_scope</jw:name>
<jw:value>PROJECT_AREA</jw:value>
</jw:Preference>
<jw:Preference>
<jw:name>com.ibm.team.apt.web.ui.planmodeviewlet.planItemId</jw:name>
<jw:value>16;_iD62sHUUEd2ikOuycfrtCA</jw:value>
</jw:Preference>
<jw:Preference>
<jw:name>com.ibm.team.apt.web.ui.planmodeviewlet.planModeItemId</jw:name>
<jw:value>6;_1w8aQEmJEduIY7C8B09Hyw/com.ibm.team.apt.viewmodes.internal.backlog2</jw:value>
</jw:Preference>
</jw:preferences>
</jw:Widget>
HTH
Comments
Mike,
In the example above the plan ID is "16;_iD62sHUUEd2ikOuycfrtCA". I'm guessing I won't be able to predict this in a process template when the plan is created during initialization. So if this is true, I won't be able to configure the plan view widget in the process template. Do you concur?
Thanks,
Carson
Carson
2 other answers
Hi Carson,
To change the name of a title, click the down arrow in the title bar, and then click Appearance:
You can then change the name in the "Title" field.
Here is the documentation: https://jazz.net/help-dev/clm/topic/com.ibm.jazz.dashboard.doc/topics/t_configure_viewlet.html.
Hope that helps,
Jenn
To change the name of a title, click the down arrow in the title bar, and then click Appearance:
You can then change the name in the "Title" field.
Here is the documentation: https://jazz.net/help-dev/clm/topic/com.ibm.jazz.dashboard.doc/topics/t_configure_viewlet.html.
Hope that helps,
Jenn
Carson,
Ah okay...check out these topics then: https://jazz.net/help-dev/clm/topic/com.ibm.jazz.dashboard.doc/topics/t_config_dashboard_templates.html and https://jazz.net/help-dev/clm/topic/com.ibm.jazz.dashboard.doc/topics/t_config_viewlet_chooser.html.
Jenn
Ah okay...check out these topics then: https://jazz.net/help-dev/clm/topic/com.ibm.jazz.dashboard.doc/topics/t_config_dashboard_templates.html and https://jazz.net/help-dev/clm/topic/com.ibm.jazz.dashboard.doc/topics/t_config_viewlet_chooser.html.
Jenn
Comments
Thanks Jenn. Yes, I had found these references, but the only memento property they reference is 'html' and some sub-properties for bookmarks. Surely, there must be a way to set more properties of these viewlets in the process template, but I can't find a more comprehensive reference. I'm stuck with trial and error, changing the template, and then creating a project to test it.
I am struggling with the same thing. A full example would help.