Using post tansition script to 'Clone and link' and set a custom field value

Cinnober Admins October 28, 2013

I'm trying to implement a "follow up system" for our service desk to follow up on JIRAs that gets left behind and lost in space. Since we have a certain set up for JIRA, I don't need alternative ways for a follow up system, I just need help with one last piece of the puzzle.

We have a Project that is tracking support tickets from a customer (C)
And we have an internal Project restricted to us at the Service Desk (SD)

So, I created a Transition on the (C) workflow, that doesn't change the issue status, and named it "Follow".

Transition details:

Transition is available to ALL steps in the workflow.
Transition View: 'Follow' Screen (This screen contains only one custom field; Follow up Date [we cannot use the regular Due date field, but it is the same, a Date picker])

Condition:
"Only users in group servicedesk-staff can execute this transition." We want this button (transition) to be restricted to our Service Desk.

Post functions:
Script workflow function : Clones an issue and links.
Issue will be cloned to project SD
With issue type: Follow up

The idea is to, with only one button, start tracking the (C) ticket using the cloned (SD) ticket, on the (SD) ticket we'll use this custom field date picker to pick a follow up date. We don't want the customer to see this Follow up Date -field on the (C) ticket.

The problem I'm having is:
When i click on the "Follow"-transition, the Date picker shows, but when i set a date, this date is not set on the cloned (SD) ticket. Also, I don't want the customer to see this field on the (C) ticket.

So, is there a way to only set the date on the (SD) ticket using this transition?

Thanks a lot in advance!

Best regards,
Markus

1 answer

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2013

Two things:

  1. What is the order of the post functions?
  2. Are you able to see the value of the date while the script is executing? (I mean via some form of logging)
  3. Does a reindex resolve the issue? (or are you having an explicit call to issue.reIndex() in your post script)?

Suggest an answer

Log in or Sign up to answer