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

This widget could not be displayed.

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
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

265 views 1 3
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