Jump to content
Sign in to follow this  
mrjoaoulisses

GET PARENT OBJECT

Recommended Posts

Hello guys,

i have a problem.

misc::change_ticket_status(this, group_leader, attached_event, event_tmpl, 'WIP');

it's used to change status of ticket, i need change status of parent ticket, how a can do this?

Thanks.

Share this post


Link to post
Share on other sites

hi,

there is 2 ways:

- try to update parents status when you change childs, method will fail if parent is currently locked (edited) by someone else;

- attach event to parent which will change it's status.

solution of 1st way: https://communities.ca.com/docs/DOC-231155346

solution of 2nd way:

- create event and action macro with code from your message; (if it's not already exists)

- run this code when you want to change parents status:

uuid who;  
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");  
who=msg[0]; // or define system user UUID here
send_wait(0, top_object(), "call_attr", "api", "insert_object", who, "atev", NULL, 0, "obj_id", parent, "wait_time", 5, "event_tmpl", "evt:012345");

where wait_time should be defined only if event delay can be reseted,

and event_tmpl should be your event persid

Share this post


Link to post
Share on other sites
Hello guys,

i have a problem.

misc::change_ticket_status(this, group_leader, attached_event, event_tmpl, 'WIP');

it's used to change status of ticket, i need change status of parent ticket, how a can do this?

Thanks.

I could not apply your solution does not work in version 12.9 of the servicedesk.

have outher solution?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...