Hi,
I am trying to auto populate fields A, B, and C on Ticket-123 with information from a linked Ticket-789. Is it possible using script field?
Best.
Community moderators have prevented the ability to post new answers.
There is a full example of this in the docs: https://scriptrunner.adaptavist.com/latest/jira/recipes/scriptfields/workRemainingInLinkedIssues.html - including a mitigation for the issue Nic mentioned.
@Nic Brough @Steve
What if I create a costume field on the current issue to manually capture the linked ticket number and then have the scripted fields reference the costume field to pull in the associated info?
In-regards to the indexing, my instance is setup to restart and auto re-index every night, hopefully that should help resolve the updated info issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you've misunderstood - it does not matter that the scripted field is on issue A. If the data on the other end of a link changes, issue A has no way to know that.
>n-regards to the indexing, my instance is setup to restart and auto re-index every night,
That is an utterly terrible thing to be doing. Why would you do something that broken?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it is possible - a scripted field can iterate over the links on the current issue, then go read the issue at the other end of the link.
There is a problem though. Although it's not quite this simple behind the scenes, you can think of a scripted field as being calculated when an issue is indexed (i.e by an update or a re-index). The field you are proposing to build has a problem - when the current issue is updated, it'll read all the links and fill in your field. But when the issues are updated at the other end, the field will not be updated because the current issue is not the one being changed. You'll need to write listeners that can trigger indexing on every single possible change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can turn off the caching in the Script Field to mitigate this effect, but I've heard it has performance implications.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.