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

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 Community Champion Nov 05, 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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,755 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot