It's all about the answers!

Ask a question

how do I can stop dojo scripts being used in some of DEFECT workitem attributes?


Pankaj Sharma (58) | asked Nov 07 '17, 7:45 a.m.

 how do I can stop dojo scripts being used in some of DEFECT workitem attributes? 


I need to update data manually in some workitems as per customer requirements hence need to stop scripts before updating data in existing workitems(defect) and restart CLM service.

2 answers



permanent link
Dinesh Kumar B (4.1k413) | answered Nov 07 '17, 7:59 a.m.
JAZZ DEVELOPER
edited Nov 07 '17, 8:01 a.m.

Hi Pankaj,

Limiting the execution to a particular work item type is possible by reading the type using
   workitem.getValue ( WorkItemAttributes.TYPE)
and
by creating a conditional clause as in
   if (type == "")
to do something specific to the types...

Similarly, if you are looking to limit the execution to specific work items, like in work item with id 10000 or so on, then you could create your conditional statements based on WorkItemAttributes.ID

However, I wouldn't recommend this approach as the work item id's are autogenerated and hard-coding and using work item Id's in script might easily become unmaintainable...

hope this helps


Comments
Pankaj Sharma commented Nov 07 '17, 8:33 a.m. | edited Nov 07 '17, 11:15 a.m.

 Hi Dinesh,


Many thanks..but you know scenario is like this 

Example -

DEFECT workitem type 111,112,113,117,118 have incorrect info. in "Filed Against" and "Owned by" field so have to update the correct info. there in above defect items.

Because some of the attributes have dojo scripts enabled, I can ONLY update above defect records after stopping ALL dojo scripts and later restart JTS service.

I am not sure how to stop ALL scripts running for the workitem DEFECT.


permanent link
Ralph Schoon (63.1k33645) | answered Nov 07 '17, 11:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 07 '17, 11:17 a.m.

You can try to disable Process Attachment Scripts in the advanced properties of the CCM server. Then ALL Scripting should be disabled. Then do your changes and enable scripting again.

https://jazz.net/forum/questions/92320/how-can-i-enable-the-process-attachment-script-in-jazzhub/94114 shows how to enable that. You can use the same steps and "False" to disable it.

Attribute customization is on attribute level and ALWAYS RUNS FOR ALL WORK ITEM TYPES THAT HAVE THE ATTRIBUTE. So you can either change (all) the scripts to bypass for specific types, or you disable Scripting. 

Your answer


Register or to post 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.