Jump to content

cdtj

Members
  • Content Count

    683
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by cdtj

  1. hi, you need to add an event listener to your dropdown so you'd able to catch when the value of first dropdown was changed: https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=770256
  2. hi, example was provided there: https://community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer/viewthread?MessageKey=88562926-f713-4866-b6a5-1772d7f98167&CommunityKey=e2cd3188-49bc-4f38-88f1-74260f56fa66&tab=digestviewer#bm88562926-f713-4866-b6a5-1772d7f98167
  3. Hi, there are 2 options: - you can write perl function to call http method and register it as spell method (search on Broadcom community for details); - if you don't need an output simply call curl method: exec("curl -X POST -d `{hello: \"world\"}` https://myapi.host.com"); The output will go to stdlog and there is no option to return it to the spell
  4. hi, you have incorrect search criteria (id = $ticketNum). try: requests.cr = '$crPersid' (persid is a ticket's identifier which looks like cr:<1234>)
  5. hi, if you do not find a legal way to do that, can always "kill" that method in $NXROOT/bopcfg/majic/<wf related maj file>, method should be called something like allow_edit.
  6. for test purposes: open ticket > in action or additional menu item > attach an event (if dont see your event, maybe you need to set some flags in it, eg; allow reset - true). for prod, as I remember, you want to trigger that stuff on ticket closure: admin tab > notifications > activtities > Closure activity > 3rd tab Evetns > attach whatever you want.
  7. The whole code including triggers and logs could help (and don't forget to put them in <code> tag ;)).
  8. hi, your code should work, providing errors could help to figure out what's wrong. I found only 1 error: wc = format("parent = '%s'", this.persistent_id, this.outage_type); // passing 2 arguments but receiving only 1. ps: there is no need to write a lot of code with this "lib": https://github.com/cdtj/zspel, after installation the second method can look like: cr::z_copy_outage_type_to_children(...) { string method, wc; method = "cr::z_copy_outage_type_from_parent()"; logf(SIGNIFICANT, "start %s for ticket %s", method, ref_num); wc = format("parent = '%s'", persistent_id); z
  9. to update something, first of all, you need to open that object for edit, acquire edit session, the process is called checkout, URL sample: OP=UPDATE+FACTORY=CR+PERSID=cr:1234 if you're have that session, you can post some changes using inputs, eg: `<input name="SET.some_attr" value="someValue" />`, and then click save (checkin) looking at your code sample you're opening some object that has cr reference, no cr itself, so you can't edit cr in that way, but you can use workarounds: - perform http query to edit cr (ajax for example) - use spel (add trigger to object you
  10. Tryed and it works without any deep customization, just used schema from the topic. Here is correct syntax for factory called "zobj" WSP: z_lrel_attachments_objs: attmnt SREL attmnt zobj SREL zobj // z_attmnt_obj.maj OBJECT zobj { ATTRIBUTES zobj { attachments BREL z_lrel_attachments_objs zobj { LREL attmnt; }; }; }; OBJECT attmnt { ATTRIBUTES Attachment { zobjs BREL z_lrel_attachments_objs attmnt { LREL zobj; }; }; }; // xx_attmnt_tab.htmpl function att_tab_src() { // ootb factories by pdm_elif // ... <PDM_ELIF "$prop.factory" == "zobj"> att_
  11. you can create custom page (form) in target sdm, z_redirect.htmpl for example, which will have some js + htmpl code to redirect to required filter: jq(document).ready(function() { window.location.href = "blablahpdmweb.exe?OP=SEARCH+FACTORY=in+QBE.EQ.assignee=${cst.id}"; // or use system defined navigation tools like: upd_specific_frame('SD', 'SEARCH', 'FACTORY=in', 'QBE.EQ.assignee=${cst.id}'); }); to open that form you can use your OP=SEARCH url and add +HTMPL=z_redirect.htmpl to it.
  12. // i hope that codeRol is defined if ((type == "R") && (active == 1) && (codeRol == "SOLSERRED")) { if (status == "OP") { if (is_null(zGrupo_Inicial) || is_empty(zGrupo_Inicial)) { send_wait(0, this, "call_attr", "zGrupo_Inicial", "set_val", group.id, "SURE_SET"); logf(SIGNIFICANT, "%s > successfully set campo zGrupo_Inicial", persistent_id); } else { logf(SIGNIFICANT, "%s > campo zGrupo_Inicial lleno", persistent_id); } } else if (status == "RE") { send_wait(0, this, "call_attr", "group", "set_v
  13. hi, there is no way to pass array as argument, but you can create an object and pass it. how to was posted by daniel on ca.community which is unreachable for me. regarding to your name, are you from CIS? and if yes, are any companies still using ca sdm?
  14. this might be caused because you have more than one SET.customer called input (like in other form which is used to create parent/child object), try to define main form in jquery selector, ex: // not sure that main_form is a name, it can be an id, then use "#main_from" instead. jq("[name='main_form'][name='SET.customer']").val(); or check other inputs to confirm that problem is in wrong selection: // check jquery .each syntax if this fails jq("[name='SET.customer']").each(function(a, b) { alert(a + ":" + b.name + " @ " + b.value); });
  15. hi, just fetch the customer after the button has been clicked. You can use jquery (which is already included in sdm), code could be: alert("pdmqa:" + jq("[pdmqa='customer']").val()); alert("SET.customer:" + jq("[name='SET.customer']").val());
  16. hi Utku! check this one: https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=765706 you need to apply refresh parent on close thing described in 10'th post in linked thread. regards.
  17. hi, ticket distribution is based on QREL called workload, default query is "assignee = ? AND active = 1" which means all active ticket on selected assignee. you can modify it in NX_ROOT/bopcfg/majic/cnt.spl (or cnt.maj or base.maj), I can't really remember in which one. so, you need to find workload attr in NX_ROOT/bopcfg/majic folder and modify it, for example to "assignee = ? AND active =1 AND resolve_date is NULL" which means count only unresolved tickets. regards, Timur
  18. hi, this one should help: https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=751297
  19. hi - you need to get the name of modification date attribute, this command should help: bop_sinfo -a wf | find "DATE" - call sync_fetch to get tasks list; example: - task by task compare modification date between fetched records; OR - using bop_sinfo get list of all domsets and maybe there is already presented sorted order by mod date, so you can use to it get the latest record.
  20. just swap priority get and display macros: <PDM_MACRO name=lswrite text="var zPriEnum = @{list.priority.enum:0}"> // this one gets current priority <PDM_MACRO name=lscol attr=priority fmtfunc=zPriClr // this one displays it
  21. hi, this is not spel related but form customization, you need to define extraurl with search criteria eg: QBE.EQ.location_attr=$args.owning_resource more about extra urls could be found in administration guide: https://ftpdocs.broadcom.com/cadocs/0/CA Service Desk Manager 12 9-ENU/Bookshelf_Files/HTML/CA_SDM_Web_Screen_Painter_Help_ENU/dtldropdown.html
  22. and one more tip, using bop_cmd could save a lot of time debuging spel code
  23. hi, you need to specify return type, eg: string z_echo(string input) { return input; } void z_echo_call() { printf(z_echo("hello")); // output: hello }
  24. hi you need to add fmtfunc to your priority lscol and add additional lswrite to fetch priority enum. there would be something like this: <PDM_MACRO name=lscol attr=priority fmtfunc=zPriClr> <PDM_MACRO name=lswrite text="var zPriEnum = @{list.priority.enum:0}"> function zPriClr(val) { function zGetPriClr(enumVal) { switch (enumVal) { case 1: return "red"; case 2: return "blue"; case 3: return "green"; default: return "black"; } } rs.data("<span style='color:" + zGetPriClr(zPriEnum) + "'>" + val + "</span>"); }
×
×
  • Create New...