3 answers
- 210
There is no sync happening because the replica before and after the event is identical.
By adding following code snippet - you force a change on the replica, which leads to a syncreplica.customKeys.foo = new Date()
An alternative is to be more specific
// test if there is at least one fix version which is released replica.customKeys.isreleased = (issue.fixVersions.find { it.released } != null)
Bonus
Have a look at this TriggerSync external script
With ScriptRunner you can capture the version event - and then call the external script to touch all related issues without modificationAdd your comment... - 10-1
Hi Peter Hochstrasser, No. Currently I'm using the following outgoing sync rule:
replica.fixVersions = issue.fixVersions.findAll{it.released}
For the incoming sync I'm using
issue.customFields."Patch version".value = replica.fixVersions?.collect{it.name}.join(",")
So it only syncs released versions. In some cases users want to set an unreleased Fixversion, just to show that a version is planned for a specific issue.
When the release is actually done, I want to (auto)sync the issue.
Add your comment... - 10-1
Do you synchronize the versions separately?
If so, you could implement the solution in the receiving JIRA project, if needed at all.
Yours truly
Peter
Add your comment...
Hi,
I have a use case where sometimes a released version AND an unreleased fixVersion is set on an issue.
When that unreleased version is released (in the release hub) a sync must be performed by using a trigger.
So, in this example (when having a released version AND an unreleased fixVersion):
when I release the (unreleased) version AND setting the date to (for example) today, then I see the corresponding issue in the Issue Navigator when using the following JQL
→ releaseDate is determined by using ScriptRunner
However, when using this JQL in a Trigger, then there's no sync happening. I still have to edit the issue in order to perform the sync.
Does anyone have an idea to solve this problem? Is there another way to sync issues by a trigger when a release is set?