We are syncing two Jira Server instances and we have two scenarios here:
1. Portfolio Team fields on both instances
2. Portfolio Team field on one side and a single select list on the other
Your support is very much appreciated.Quelle: Feature - Custom field sync(old community)
When a sync is happening the other side will receive
replica.customFiels.Team.description.title should contain the name of the team.
Applying to a select list is straightforward by using the getOption approach.
We are looking how to set the team field, it needs to go through the Portfolio/Advanced Roadmap api.
But this approach should already cover part 2 of the question
Amr Hamza commented on 09 July 2020
Thanks Francis Martens (Exalate) .
Agreed. I suppose the obstacle here is how to set the Portfolio Team field in the incoming sync rules.
Amr Hamza commented on 21 July 2020
Hi Francis Martens (Exalate).
I hope you’re well. Just wanted to check, if there is any progress here.
Thanks.
Cheers,
Amr
Amr Hamza commented on 05 August 2020
Hello Francis Martens (Exalate),
Are there any updates on this question?
Thanks.
Cheers,
Amr
Berry Kersten commented on 16 November 2020
hi Francis Martens (Exalate), I have an almost similar use case, except I just want to show the Team Name on the remote side.
I have created a new custom field (single text line) Team, and now it shows {“id”:1,“description”:{“title”:“Team A”,“avatarUrl”:{},“shareable”:true}}
So, I suppose I have to trim this so that only Team A will be shown. Any idea how to do this kind of trimming? Thanks.
Francis Martens (Exalate) commented on 16 November 2020
Hmm, in that case no information is being synced: in remote issues there’s no Custom Keys Teamtitle present.
It looks like it does not get the exact data within {“id”:3,“description”:{“title”:“Team IDE (C)”,“avatarUrl”:{},“shareable”:true}}
Francis Martens (Exalate) commented on 17 November 2020
Can you check what the value is of issue.customFields.Team?.description?.title by adding
throw new Exception("Title = ${issue.customFields.Team?.description?.title}")
in the outgoing sync. It should clarify if you get some information out of that customfield
Berry Kersten commented on 18 November 2020
Sure, then I’m getting com.exalate.api.exception.script.ChangeProcessorException: Script error for issue RI-5024. Details: No such property: title for class: java.lang.String.
Francis Martens (Exalate) commented on 18 November 2020
(old community)
You will have to do some investigations.
Can you try
throw new Exception("Title = ${issue.customFields.Team.value?.description?.title}")
…
Berry Kersten commented on 23 November 2020
Francis Martens (Exalate) Sure, in that case it returns: Details: Title = null.
Francis Martens (Exalate) commented on 04 December 2020
In an earlier comment you indicated
I have created a new custom field (single text line) Team, and now it shows {“id”:1,“description”:{“title”:“Team A”,“avatarUrl”:{},“shareable”:true}}