Automated test framework : set field value not possible on Work notes field

thomas_langlade
Mega Contributor

Hi everyone,

It seems that the configuration step "Set field values" do not work at all with fields typed as journal. (tested on our customer code version + an out of the box code version => same results)

For a new incident for there is no issue, but for an existing incident, I'm not able to set a work note value I have the log below :

FAILURE: Unable to set field 'work_notes' to value 'test'. Field 'work_notes' is not editable. See screenshot

And there is no issue on the Screenshot.

Is there any workaround/fix to manage this field from the automated tests ?

It's important because our customer set the work notes mandatory in some use cases on the incident form, then I can't finish the test properly.

Thanks by advance,

Thomas

13 REPLIES 13

JD37
Giga Expert

Just looking at the Automated Test Framework on Jakarta and I too have hit this problem with Incidents. Is the problem across the board, as in will I encounter the same for Requests if I were to call a Workflow that writes to Work Notes?



Does anyone know if this problem is addressed in Jakarta Patch 2?


It doesn't appear to be. I just tried it and got:



Successfully set field 'short_description' to value 'This is my second UI Batch'


Successfully set field 'description' to value 'It is separated by the server side step. But each step will still run in order.'


FAILURE: Unable to set field 'comments' to value 'Testing to set other comments'. Field 'comments' is not present on the form. See screenshot


mitzaka
Mega Guru

As I have the same issue with not being able to edit comments / work notes / journal fields, I opened an incident with HI.


Here is their official statement (I guess we don't have a cure for the time being....)



Hello Dimitar, We have identified that reported issue is a known problem defect and has been logged in PRB752835 - Field 'work_notes' is not editable -- g_form.isEditableField returns false for editable journal_input fields on the form of an existing record. For your reference we have assigned the problem to the incident. PRB752835 is still under investigation and it has been confirmed by development team but unfortunately no fix target has been set yet. Please accept our apologies for any inconvenience created by this issue. I will move this incident to a pending problem state and assign a problem manager to it.


Chris Raga
Tera Expert

Quick update to this issue, I found the work around for this via KB0657392, but current instance I'm working on is Istanbul. Looks like the permanent fix is targeted for London. Till then, I put in this onLoad client script on the tables that I know I will need to edit journal fields:

function onLoad() {
	
	//Hide the non metadata driven Additional comments and Work notes fields
	// Added by  the Activities (Filtered) formatter
	
	//Use this line for Jakarta and later releases
	//$j('.sn-form-stream-input-area').hide();
	
	//Use this line for Istanbul and prior releases
	$j('.sn-form-stream-init').hide();
	
	
	// Show the OOB metadata driven Additional comments and Work notes
	// Hidden by the Activities (Filtered) formatter onLoad
	$j('.form-group').show();	
}

In an effort to keep the user experience from suffering I keep active = false (unchecked) on the script records, then I activate them via a fix script, run my ATF Suite, and turn them back off. 

Hopefully this helps as a viable workaround.

The workaround worked - thank you!