Do not update fields in visual mode?

Originally asked by Alex Sandoval on 05 July 2023 (original question)


Is there a way to configure Exalate to only copy certain fields once (on initial exalation) then after that ignore changes?


Answer by Alex Sandoval on 06 July 2023

Heres an example with description

if(firstSync){
Jira.issue.summary = Ado.issue.title
Ado.issue.title = Jira.issue.summary
Jira.issue.description = Ado.issue.description
Ado.issue.Description = Jira.issue.description
}

if(!firstSync){
Jira.issue.summary = Jira.issue.summary
Ado.issue.title = Ado.issue.title
Jira.issue.description = Jira.issue.description
Ado.issue.Description = Ado.issue.description
}


Answer by Alex Sandoval on 05 July 2023

What you have to do is the following: add a script from the rules part, and then in the script add the following:
if(firstSync){
Jira.issue.summary = Ado.issue.title
Ado.issue.title = Jira.issue.summary
}
if(!firstSync){
Jira.issue.summary = Jira.issue.summary
Ado.issue.title = Ado.issue.title
}

where “Jira” is the name given in the connection and “Ado” is the name of the remote.
This applies to description as well, it is just that it must be adjusted to the client’s needs.


Comments:

Stéphane Thillay commented on 06 July 2023

That sounds good.

Is this really useful to have a “not firstSync” condition?

I assume that anything outside of the “firstSync” block would be process anytime, during the initial and all subsequent connection/synchronisation.

Harold Oconitrillo commented on 14 July 2023

Hi,

Did you delete the mapping after you add the scripts?
Then, for the issue case you have, we highly recommend you to switch to scripting mode since Visual connection type is not recommendable for advanced configurations.

Do not hesitate to contact us back if you need more help.

Kind regards,

Harold Cruz