Clarity Service Management

add_issue 

12-09-2015 05:16 PM

SPEL API methods

add_issue

 

This method allows to create new issue by using template or from the scratch. It also allows to populate properties if they are defined for the category

 

Definition:

add_issue( uuid, string, string, int, ... ) ;

uuid - user id

string - id of the issue template (optional)

string - created_via persistent_id defines creation interface.

int - number of properties values that will be passed to method (0 - no properties values)

... - if number of properties values >0, values of the properties shall be passed first and then name-value pairs for the attributes to update "atribute1", "value1","atribute2", "value2"

 

working examples"

1. Without properties

uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "add_issue", who, "2852", "intfc:3553", 0, "requestor", who);
if (msg_error()) {
  logf(ERROR, "get_failed %s",msg[0]);
}
   

2. With properties

uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "add_issue", who, "2852", "intfc:3553", 2, "prp1", "prp2", "requestor", who, "category","isscat:9101");
if (msg_error()) {
  logf(ERROR, "get_failed %s",msg[0]);
}
   

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.