You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Is it possible to use a listener to update a Custom Date Field with the Due Date, but the Due Date information is on a ticket that relates to the main ticket?
- IssueA has the custom date field
- IssueB is linked to IssueA (relates to) and IssueB has the Due Date field filled in
- Want to automatically copy the date in the Due Date field from IssueB to the custom date field present in IssueA
Would that work with regards to the linking/relates to aspect?
I have this script which I used previously to update a date field but unsure how to modify the script to full the "Due Date" from the linked/relates to issue.
def issue = event.issue
def issueLink = ComponentAccessor.getIssueLinkManager()
// the name of the custom field to update
final customFieldName = 'FieldA'
// the new value of the field
final newValue = linkedissue.dueDate //This is where I am struggling
def customFieldManager = ComponentAccessor.customFieldManager
def customField = customFieldManager.getCustomFieldObjects(issue).findByName(customFieldName)
assert customField : "Could not find custom field with name $customFieldName"
customField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(customField), newValue), new DefaultIssueChangeHolder())
Hello @Drishti Maharaj
If you don't mind testing an add-on, Elements Copy & Sync lets you do exactly that.
Full disclosure, I'm the Product Manager of the app.
With our fields mapping, you can copy anything you want from an issue to another issue, including a Date Custom Field into the Due date.
As a bonus, you can keep this value synchronized, so if you change it in the original issue it can change automatically in the copied issue.
The app is free for 30 days, (and stays free if your instance is under 10 users), so feel free to give it a try, and don't hesitate to tell reach our Support if you have any question.
So going forward yes, when the Due Date is entered in B, it should be copied over to the field in A.
However, we have about 100 issues already that need to be updated first.
B already has the Due Date field filled in and want to copy that info across to the custom field in A so was trying to find a way to do this automatically for the existing issues first.
It is created at the timing when the custom field is needed, such as when the WBS or Gantt chart screen is displayed for the first time or when the setting screen is displayed.
Even if these custom fields are deleted, they will be created again when WBS Gantt-Chart for Jira needs that custom field.