How to incorporate the default values for a description field using dojo script for a particular Work Item
How to incorporate the default values for a description field using dojo script for a particular Work Item (like only for a story etc.,)
Description field should auto populate only when Work Item = "Story" and not for others using dojo. |
2 answers
Dinesh Kumar B (4.1k●4●13)
| answered Apr 07 '15, 8:58 a.m.
JAZZ DEVELOPER edited Apr 07 '15, 9:00 a.m. You will have to use a Script Based Default Value applied to the Description attribute. Some sample code for you to set Default Description for Defect work item would be : dojo.provide("com.example.defDefectDescription"); dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes"); (function() { var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes; dojo.declare("com.example.defDefectDescription", null, { getDefaultValue: function(attribute, workItem, configuration) { var defectDesc = null; if(workItem.getValue(WorkItemAttributes.TYPE) === "defect") // for a story from Scrum project the ID to compare against would be : com.ibm.team.apt.workItemType.story defectDesc = "this is for defect only"; return defectDesc; } }); })(); The key here is to look for the ID of the Work Item Type and return the values accordingly. You may additionally want to read more on this here : https://jazz.net/forum/questions/98267/how-to-set-different-default-owners-for-different-workitem-types Comments
vineeth vp
commented Apr 08 '15, 1:42 a.m.
|
We need to update couple of fields based on the selection of Restricted Access (Access Groups) field or limit the options available under Restricted access based on the selection of two fields. because we have 70 Access group combos to restrict access between customer and internal department.
Problem is I do not see Restricted Access field either in the source or destination fields of the Value Sets of type Dependent Enumerations.
Is there a Followup action script or something that can achieve this?
|
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.