System rules

Each company has its own rules and standards. Safe TMS doesn't enforce you to change them; instead, it provides a flexible infrastructure to play by your rules.

Dependencies

Addict has some optional rules which can be customized if needed. Check the docs for more details.

TickSys contains the entire ticketing system integration logic. In case you will use such an integration, the settings and rules in TickSys will be essential. Check the docs for more details.

Safe TMS

Some of the rules reside within Safe TMS itself, in form of an ABAP class.

  • YIF_SAFETMS_SYSTEM_RULES is the rule interface
  • YCL_SAFETMS_DEF_SYSTEM_RULES is the default rule implementation

If you do nothing, Safe TMS will use YCL_SAFETMS_DEF_SYSTEM_RULES as the rule behavior class.

If you want to implement your own code to make Safe TMS behave according to your own rules,

  • Create a new Z-Class, implementing YIF_SAFETMS_SYSTEM_RULES
  • Fill the methods provided by the interface
  • Register your class into YTSAFETMS_SYDEF

You can inspect YCL_SAFETMS_DEF_SYSTEM_RULES as a starting point; and adapt the code as needed.

  METHODS get_ticket_key_of_request
    IMPORTING trkorr            TYPE trkorr
    RETURNING VALUE(ticket_key) TYPE yif_ticksys_ticketing_system=>ticket_key_dict
    RAISING   ycx_addict_class_method.

This method should return the ticket key of the given request.

  METHODS get_request_related_tickets
    IMPORTING ticketing_system       TYPE REF TO ycl_ticksys_ticketing_system
              tickets                TYPE yif_ticksys_ticketing_system=>ticket_id_list
    RETURNING VALUE(related_tickets) TYPE yif_ticksys_ticketing_system=>ticket_id_list
    RAISING   ycx_addict_class_method.

This method should return all request-related tickets of the given ticket.

Some tickets are related by their corresponding requests.

Example: Jira has a concept of issue + sub-issue. Parent issues might be request-related to their child issues. This means; a request taken for the child issue is also related to the parent issue.

Following that concept; the default behavior is to read the sub-tickets of the given ticketing system, and return the children as related. Parents of sub-issues are also considered as related. Siblings too.

  METHODS get_request_substitute_tickets
    IMPORTING ticketing_system       TYPE REF TO ycl_ticksys_ticketing_system
              tickets                TYPE yif_ticksys_ticketing_system=>ticket_id_list
    RETURNING VALUE(related_tickets) TYPE yif_ticksys_ticketing_system=>ticket_id_list
    RAISING   ycx_addict_class_method.

Sometimes, an issue may have requests for ticket A or ticket B.

Typical example: Assume that ticket A is parent and ticket B is child. Developer working on ticket B may create a request for ticket A, and put stuff regarding ticket B into request of ticket A.

This method will be called with ticket B, and we are expected to return ticket A.

  METHODS get_tickets_to_upd_after_stms
    IMPORTING sysid            TYPE yd_safetms_sysid
              ticketing_system TYPE REF TO ycl_ticksys_ticketing_system
              tickets          TYPE yif_ticksys_ticketing_system=>ticket_id_list
    CHANGING  !errors          TYPE yif_safetms_trans_visitor=>visitor_error_list
    RETURNING VALUE(updates)   TYPE ticket_status_update_list
    RAISING   ycx_addict_class_method.

After a request is transported, the related ticket needs to be updated. However; in some cases, we need to update additional tickets as well.

Example: If parent ticket is transported, we need to update some of the child tickets as well.

This method has been defined for that purpose. If you don't have a ticketing system, you may ignore this.

  METHODS get_transport_instructions
    IMPORTING transporter         TYPE REF TO ycl_safetms_transporter
    RETURNING VALUE(instructions) TYPE req_note_list
    RAISING   ycx_addict_class_method.

Returns request instructions. Typical action: Query ticket system for instructions for tickets.

  METHODS get_transportable_tickets
    IMPORTING ticketing_system TYPE REF TO ycl_ticksys_ticketing_system
              routes           TYPE route_id_list
    RETURNING VALUE(tickets)   TYPE route_ticket_list
    RAISING   ycx_addict_class_method.

Returns transportable tickets of the given route. Typical action: You can query the ticketing system for the tickets of appropriate status.

  METHODS get_requests_of_tickets 
    IMPORTING ticket_keys     TYPE yif_ticksys_ticketing_system=>ticket_key_list
    RETURNING VALUE(requests) TYPE trkorr_list
    RAISING   ycx_ticksys_ticketing_system.

Returns the requests of the given ticket. Suggested practice: Request text starts with ticket number. Sample format: VOL-12345 - Explanation