Answer by ben friedman on 23 October 2020
Hi Francis Martens (Exalate), thanks for suggesting, but thats not exactly the case. (i just realized my description of the issue wasnt very good)
on JSD, i set the issue to âwaiting for customerâ. then the customer replies. then there is an automation rule, to transition from âwaiting for customerâ to âin workâ.
if the response comes from the JSD portal, all is working well. if its coming from ZD, the automation rule isnt triggered.
(the issue is around the user of the comment. if i remove user restrictions from the conditions of the automatic rule, then the rule works fine).
to work around, i need to set some other trigger for the rule, on comments coming from ZD side.
if i use issue.setStatus(âWaiting for Supportâ) on JSD incoming, this means on every change on ZD, the JSD will attempt/be set to the status. its possible that while âwaitign for customerâ the user on ZD will edit other fields, which are not the comment.
i tried using the code blobs from the exalate documentation to set the commenting user on JSD side, but all of those gave me errors.
so, now im thinking of adding a unique identified to the text of the comments coming from ZD, and i can trigger the rule based on the content of the comment.
can you advise on how to add some unique text to the incoming comment?
or, now that the use case is better described, suggest another solution?
Comments:
Francis Martens (Exalate) commented on 23 October 2020
You donât need to do the issue.setStatus(âIn Workâ) all the time.
It cam be more advanced as in
Incoming Sync - JSD
if (issue.status.name == "Waiting for Customer") {
issue.setStatus("In Work")
}
The exact conditions are to be setup
ben friedman commented on 23 October 2020
In my case, the exact condition is if a comment was added. How would i define such condition?
Francis Martens (Exalate) commented on 23 October 2020
if (replica.addComments?.size() > 0) {
issue.setStatus(âIn Workâ)
}
ben friedman commented on 23 October 2020
Thanks!!