add_issue

Document created by Gutis Champion on Dec 9, 2015Last modified by Gutis Champion on Feb 27, 2016
Version 2Show Document
  • View in full screen mode

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]);
}
   
1 person found this helpful

Attachments

    Outcomes