Workflow editor is disgusting


Is it possible to turn it into simple code editor? Its behaviour is the most unexpeced.

  • I try to write: "sendMail(Customer email" but then i press space after "Customer" it just removes the whole word (I have not found ways to write it still.)

  • I try to highlight the beginnign of the "sendMail(Customer email, l10n ( [Запрос  {getId()} ]  {summary} ), ...the long text goes there..." but it does not allows me to do this: either only sendMail or the whole call.

  • Somehow i managed to wrote "sendMail(Customer email, l10n ( [Запрос  {getId()} ]  {summary} )" (actually i copy-pasted it from another file and cut it). Then i try to add the third argument with the text of a mail. I write ", l10n()" but it is highlighted with red and that's it. The only way to fix it a i have found so far is to copy paste the previouse argument and clear a text

  • Now i have "sendMail(Customer email, l10n ( [Запрос  {getId()} ]  {summary} ), l10n ( << .. >> ));" and i try to write some text there. And it goes red to. Well, i give up.

It is the most frustrating expirience in my life. (And i just have skipped some other things)
You can either wait for the built-in translation which will appear in the one of the nearest releases or localize it by yourself.

For manual localization you have to completely replace the l10n() expression with needed "string".
Actully i am trying to create a new one email which will be send when an issue is created.
So could you please tell me how to use the editor? Why it clears "sendMail(Customer email" after i type Customer and press space? And how to add parameters to l10n()? (You can see on screenshot how it looks like when i just type " sometext {getId()}" ) - it just stays green

Translation is another issue...
I have changed default rule for this, but users still receive english text. Could you please explain why?

rule Send notifications to unregistered users

when comments.added.isNotEmpty {
  var myComment = comments.added.first;
  if (Customer email != null && myComment.permittedGroup == null && Customer email != Last comment author) {
    sendMail(Customer email, l10n ( [Запрос  {getId()} ]  {summary} ), l10n ( <p style="font-size:14px; font-family: sans-serif; color:#000000; margin:14px 0 19px 44px">Новый комментарий был добавлен <b> {} </b> в {myComment.created.format(mediumDateTime)} </p><table style="border-collapse: collapse; width: 100%; table-layout: fixed;">    <tbody>    <tr>        <td style="padding:12px 15px; background:#f0f0f0">            <table style="border-collapse: collapse; border: 0; width: 100%;">  <tbody> <tr>     <td style="vertical-align: top; font-family:sans-serif; font-size: 13px;"><a title="YouTrack" style="float:left; margin-right:6px; font-size: 15px; color: #1466c6; text-decoration: none;" href=" {getUrl()} "> {getId()} "</a> <a style="font-size: 15px; color: #1466c6; text-decoration: none;" href=" {getUrl()} "> {summary} </a>     </td> </tr> </tbody>            </table>        </td>    </tr>    </tbody></table> <table style="width: 100%; border-collapse: collapse; border: 0;"><tr><td style="padding: 10px 0 10px 10px; vertical-align: top; font-family:sans-serif; font-size:13px; background:#f0f0f0; border-top: 8px solid #ffffff;"> {wikify(myComment.text)} </td></tr></table> <div style="margin-left: 44px; padding: 4px 0 8px;">    <div style="color: #777777;              font-size: 11px;             font-family: sans-serif;             margin: 20px 0;              padding: 8px 0; border-top: 1px solid #D4D5D6;"> Вы (<b> {Customer email} </b>) получили это сообщение, потому что вы написали нам запрос  <a href=" {getUrl()} "> {getId()} </a>. С уважением, поддержка</div></div> ));
  Last comment author = null;
Please use Ctrl+Space always where possible.

So in the method sendMail() you have to complete the field 'Customer email' by Ctrl+Space, the same for getId, summary etc.

To add a new parameter to a method invocation you have to press 'Enter' standing on the other method parameter.

As for localization you recommend you completely get rid of l10n() expression and use simple text instead of.

Localization in the workflow works as follow: l10n can have infinite number of parameters of type string or of other type which can be cast to string. By this parameters the Workflow Editor can generates key (manually). This key and localized value(s) are packed statically is YouTrack.

So to localize in truth a workflow string you have to provide localization strings in YouTrack, as described here.

Also please look at the quick workflow reference for details.

So, if you need to localize notification only to Russian I advise you to replace l10n() expression with simple string: "На ваш запрос была заведена задача " + getId() completely.

Or wait the nearest bug fix, localization of this workflow to Russian will be included there. Other languages'll be provided soon.
Thank you, it helped!
Though it still enrages me that WE does not behave as just code editor :)

Please sign in to leave a comment.