Losing my open/close parens

Situation : In the script view, I write the following:

    String Beginning_date = ( new Date()+1 ).format('dd/MM/yyyy')

However, when I use the manual view to change or add an item I lose the open/close parens and the code is changed to

    String Beginning_date = new Date()+1.format('dd/MM/yyyy')

Expectation: I expect the code to remain unchanged

Actual: The code has been changed

Note: The Manual View displays the code incorrectly as

             String Beginning_date = new Date()+1.format('dd/MM/yyyy') 

             I'm assuming because it's represented incorrectly, it is saved that way when I make a change in the 
             manual view

I tried repeating your issue (KS v7.0.0) but failed. My KS is set to use Script view by default.

There are also a bunch of settings under Groovy and Java related to formatting.

I’m on (KS v6.3.3),

Changing from “in Manual View” to “In script View” and playing around with the groovy / java formatting didn’t make a difference.

Maybe it has been fixed in version 7 , but version 7 is still beta and I’m staying with 6.3.3 for now.

If you want to replicate the problem, try it in version 6.3.3.

Upgraded to version 7.0.8

The problem is still there

@devalex88

I just confirmed this is a bug. Visiting Manual view and making a change will destroy the parens in the example.

Steps:

  1. Enter this in Script view:
String Beginning_date = ( new Date()+1 ).format('dd/MM/yyyy')
  1. Visit Manual view and add WebUI.acceptAlert()

  2. Go back to Script view and observe broken code…

image

@Matthew_Loo

One last thing to check:

My preferences are set as displayed

I also have a situation where I’m losing my CustomKeywords function parameters if you preform the same step as described.

Steps:

  1. Enter this in Script view:

CustomKeywords.‘com.database.sqlserver.executeProc’(DBserver:GlobalVariable.DBserver,
automationDB:GlobalVariable.automationDB,
DBusername:GlobalVariable.DBusername,
DBpassword:GlobalVariable.DBpassword,
client_name:GlobalVariable.test_client,
proc_name:‘delete_PersonAlert’,
RBdatabase:GlobalVariable.RBdatabase)

  1. Visit Manual view and add WebUI.acceptAlert()

  2. Go back to Script view and observe broken code…

    CustomKeywords.'com.database.sqlserver.executeProc'()

Hi. We will work on a fix for this soon. Thank you everyone for the bug report.

1 Like