Local issue sync: one master ticket to multiple destination tickets

Originally asked by Venkatesh Pokala on 04 August 2020 (original question)


Hi Team,

We created two local (single project) connections

I. SOURCE_to_DEST1
II. SOURCE_to_DEST2

Below are the user requirements and findings: Please help us to configure this way.

1. In “Exalate” field, can the destination projects be multiply selectable? We will have many projects.

2. I created SOURCE-1 (master case) to sync both DEST1-1 and DEST2-1.

(a) When I OPEN DEST1-1, SOURCE-1 is OPEN. (good)

(b) When I REJECT DEST1-1, SOURCE-1 is REJECTED. DEST2-1 is still OPEN state. à It’s not expected. Our target is when all connected JIRA cases are CLOSED or REJECTED, then the master case is closed.

3. I created the SOURCE-2 (master case) to sync both DEST1-2 and DEST2-2.

(a) When I OPEN DEST2-2, SOURCE-2 is open and DEST1-2 keep NEW. (good)

(b) When I Fix DEST2-2, SOURCE-2 is FIXED. DEST1-2 status keep the same (ok)

(c) When I Close DEST2-2, SOURCE-2 is CLOSED. DEST1-2 status keep the same à It’s not expected. Our target is when all connected JIRA cases are CLOSED or REJECTED, then the master case is closed.

4. Can the sync cases showed in the master case? Below is the example, show the case status after JIRA case (red font).

Thanks,
Venkatesh.


[Failed to download attachment: attachment_11341197_GetAttachmentThumbnail. Error: 401 Client Error: for url: https://outlook.office365.com/owa/Pokala.Venkatesh@netgear.com/service.svc/s/GetAttachmentDownloadToken?redirect=%2Fowa%2FPokala.Venkatesh%40netgear.com%2Fservice.svc%2Fs%2FGetAttachmentThumbnail%3Fid%3DAAMkAGQ0YmMxNTcwLTdhYWMtNDg3Yy05NWQ1LTE3MWM0MzkzMDAxMABGAAAAAACPg%252b1wfFLATJtXsJZ3yu2NBwBzH7X%252bibVBTpjx7QYBUQZYAAAAAAENAAAuvvo9b3wCRLFfcP43A5PoAANWKpXTAAABEgAQAItV3EsDipxFrXrMF5E%252fBrA%253d%26amp%3BthumbnailType%3D2%26amp%3Bowa%3Doutlook.office.com%26amp%3BscriptVer%3D2020072701.08%26amp%3BX-OWA-CANARY%3DJKVVKAHLRki8_TlGL50EwC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jLTQ2MDAtODU1MC05NjQyMGQ5NDNiYTEiLCJoYXBwIjoib3dhIn0.Pk9YxqR0L83-kXQqVmwec30wzNKlK7Q-WTqNOwvGsi_2Q5xIsbL3AOerkjkWzFhYw_TIMSSiWkcjjyaxfIf0iuO_zkzz_PHw9RgRE8_T-5x1xPGhCveFHYV-mpzjUjFTKt_DjW1zggsvft6G7vDjGgjDM-tupkHnqXU3szlENreGpvRStTDRQyXmuTbH2A3k4JoUpqpb22PwEua5u_rq1HosBxUvfKBeoR1SPVYRl3PlKnocwDMQ3_6n01w_kZt2iA7AFHi7XYZfEta8Z3wG8yj46qTO7OSU4hhDwTFTrBcNP9iRXp-fcSTqmxBwVprYRzgdxBi1PkRqh_a4qFHM2w%26amp%3Banimation%3Dtrue]

Answer by Francis Martens (Exalate) on 04 August 2020

Hello Venkatesh Pokala

You will have to build some more advanced logic into how the status of the source issue advances.

One approach could be to track the remote status of each connected issue in one or more custom fields
For instance

  • customfield ‘Remote Status RAX20’
  • customfield ‘Remote Status LAX20’

In the incoming sync processor connection F6755_to_RAX20, set the remote status RAX20 as follows

issue.customFields."Remote Status RAX20".value = replica.status.name

and do the same in the connection F6755_to_LAX20

issue.customFields."Remote Status LAX20".value = replica.status.name

In both incoming processors advance then the source status based on the content of the remote status fields

if (issue.project.key == "F6755") {
   def remoteStatusRAX20 = issue.customField."Remote Status RAX20'.value
   def remoteStatusLAX20 = issue.customField."Remote Status LAX20'.value

   if (remoteStatusRAX20 == "Rejected" && remoteStatusLAX20 == "Rejected") {
      issue.status = "Rejected"
   }

This is untested code - but you can get the idea


Comments:

Venkatesh Pokala commented on 04 August 2020

Hi Francis,

You mean do I need to use the “advanced” connection? instead of single?

Thanks,

Venkatesh.

Francis Martens (Exalate) commented on 04 August 2020

I meant that you need to develop a more advanced synchronization, using an approach as depicted above.

If interested - we can bring you in contact with one of our exalate partners that can provide the necessary services to implement this use case.

Let me know

Venkatesh Pokala commented on 06 August 2020

Francis Martens (Exalate) ,

I definitely let you know if we required partner support. I tried your suggestions but unfortunately not able to get the remote status

Cannot get property 'Remote Status RAX20' on null object. 

Can you please help us to unblock this issue?. Thank you so much for your help.

Thanks,

Venkatesh.

Francis Martens (Exalate) commented on 06 August 2020

Keep in mind that working with a partner will get you much quicker the result you need. The alternative is that you need to go through a learning curve, and understand what is happening before you can get to a result.

Regarding
> Cannot get property ‘Remote Status RAX20’ on null object.

This is not sufficient context .
I cannot help with the information you provided.