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

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

767 views 2 19
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