Jump to content
Sign in to follow this  

"copy" button for request

Recommended Posts


I need some help with the creation of a button to copy requests

I modified the detail_cr from with this.

<form name="frm003">
<input type="hidden" name="SET.requested_by" value="$args.requested_by">
<input type="hidden" name="requested_by_combo_name" value="$args.requested_by.combo_name">
<input type="hidden" name="SET.customer" value="$args.customer">
<input type="hidden" name="customer_combo_name" value="$args.customer.combo_name">
<input type="hidden" name="SET.assignee" value="$args.assignee">
<input type="hidden" name="assignee_combo_name" value="$args.assignee.combo_name">
<input type="hidden" name="SET.group" value="$args.group">
<input type="hidden" name="group_combo_name" value="$args.group.combo_name">

<input type="hidden" name="SET.priority" value="$args.priority">
<input type="hidden" name="SET.severity" value="$args.severity">

<input type="hidden" name="SET.urgency" value="$args.urgency">
<input type="hidden" name="SET.impact" value="$args.impact">

<input type="hidden" name="SET.resolution_code" value="$args.resolution_code">
<input type="hidden" name="KEY.resolution_code" value=<PDM_FMT ESC_STYLE=C>$args.resolution_code.sym</PDM_FMT>>

<input type="hidden" name="SET.resolution_method" value="$args.resolution_method">
<input type="hidden" name="SET.change" value="$args.change">
<input type="hidden" name="KEY.change" value="$args.change.chg_ref_num">

<input type="hidden" name="SET.caused_by_chg" value="$args.caused_by_chg">
<input type="hidden" name="KEY.caused_by_chg" value="$args.caused_by_chg.chg_ref_num">

<input type="hidden" name="SET.affected_resource" value="$args.affected_resource">
<input type="hidden" name="KEY.affected_resource" value=<PDM_FMT ESC_STYLE=C>"$args.affected_resource.COMMON_NAME"</PDM_FMT>>
<input type="hidden" name="SET.parent" value="$args.persistent_id">
<input type="hidden" name="KEY.parent" value="$args.ref_num">

<input type="hidden" name="SET.category" value="$args.category">
<input type="hidden" name="KEY.category" value=<PDM_FMT ESC_STYLE=C>$args.category.sym</PDM_FMT>>

<input type="hidden" name="SET.summary" value=<PDM_FMT ESC_STYLE=JS2>"$args.summary"</PDM_FMT>>
<input type="hidden" name="SET.description" value=<PDM_FMT ESC_STYLE=JS2>"$args.description 
(creado a partir de la solicitud $args.ref_num)"</PDM_FMT>>

And then i created the button as follows
<PDM_MACRO name=button Caption="Crear copia[!eaI]" Func="create_new('cr',0,0,0,'PRESET=type:R','INITFROM=frm003')" hotkey_name="Create copia[!eaI]" ID=ITIL_REQUEST>

It works, a new request is created with all the fields charged from the original ticket.

The problem is with the attached files and the properties, if i have a ticket with properties or attached files it does not go to the copy request.

How i can attached the files of the original ticket to the copy?

How i can pass the properties of the original ticket to the copy?


Share this post

Link to post
Share on other sites


Copying attachments is possible using spel, here is example: https://communities.ca.com/message/241829709

i'm not sure about props (there could be some flag in options to keep them), and as props are defined using web form you can also try to define followed inputs:

<input type="hidden" name="SET.prop0.value" value="$args.prop0.value">
<input type="hidden" name="SET.prop1.value" value="$args.prop1.value">
<!-- and so on -->

Regards, cdtj

  • Like 1

Share this post

Link to post
Share on other sites

hi cdtj

I had already found your contributtion in ca community and it works (whit right click-copy)

But i want to make a button in detail_cr that has this same function, and i can not call the same function (copy_cr_site) from detail_cr, so i just made a new button that create a new request, and passed all the parameters from the old to the new.

If i could call the the same function that is called with right click-copy my problem will be solved, but i don't know how achieve this.

Please help

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this