Skip to content
Snippets Groups Projects
Commit 19e4611b authored by tranoris's avatar tranoris
Browse files

fixe for notes

parent 9850d827
No related branches found
No related tags found
2 merge requests!59MR for Release 2024Q4,!48Generic controller enhancement
Pipeline #10444 passed
...@@ -578,8 +578,12 @@ public class ServiceRepoService { ...@@ -578,8 +578,12 @@ public class ServiceRepoService {
} }
if (serviceCharacteristicChanged) { if (serviceCharacteristicChanged) {
if (service.getServiceCharacteristicByName("_DETAILED_NOTES_") != null) { Characteristic noteCheck = service.getServiceCharacteristicByName("_DETAILED_NOTES_");
if ( noteCheck!= null
&& noteCheck.getValue() != null
&& noteCheck.getValue().getValue() != null
&& !noteCheck.getValue().getValue().equals("")) {
Note noteItem = new Note(); Note noteItem = new Note();
noteItem.setText("Service Characteristic changed: " + charChangedForNotes ); noteItem.setText("Service Characteristic changed: " + charChangedForNotes );
noteItem.setAuthor("SIM638-API"); noteItem.setAuthor("SIM638-API");
...@@ -643,6 +647,11 @@ public class ServiceRepoService { ...@@ -643,6 +647,11 @@ public class ServiceRepoService {
this.addServiceActionQueueItem(saqi); this.addServiceActionQueueItem(saqi);
} }
/* /*
* Update any parent service * Update any parent service
*/ */
...@@ -950,6 +959,8 @@ public class ServiceRepoService { ...@@ -950,6 +959,8 @@ public class ServiceRepoService {
public ServiceActionQueueItem addServiceActionQueueItem(@Valid ServiceActionQueueItem item) { public ServiceActionQueueItem addServiceActionQueueItem(@Valid ServiceActionQueueItem item) {
logger.debug("Will add ServiceActionQueueItem ServiceRefId: " + item.getServiceRefId() ); logger.debug("Will add ServiceActionQueueItem ServiceRefId: " + item.getServiceRefId() );
//find any similar action inqueue and delete them, so to keep this one as the most recent //find any similar action inqueue and delete them, so to keep this one as the most recent
List<ServiceActionQueueItem> result = this.serviceActionQueueRepo.findByServiceRefIdAndAction(item.getServiceRefId(), item.getAction()); List<ServiceActionQueueItem> result = this.serviceActionQueueRepo.findByServiceRefIdAndAction(item.getServiceRefId(), item.getAction());
logger.debug("Will add ServiceActionQueueItem ServiceRefId result: " +result.size() ); logger.debug("Will add ServiceActionQueueItem ServiceRefId result: " +result.size() );
...@@ -1157,7 +1168,11 @@ public class ServiceRepoService { ...@@ -1157,7 +1168,11 @@ public class ServiceRepoService {
supd.addServiceCharacteristicItem( cNew ); supd.addServiceCharacteristicItem( cNew );
} }
if (as.getServiceCharacteristicByName("_DETAILED_NOTES_") != null) { Characteristic noteCheck = as.getServiceCharacteristicByName("_DETAILED_NOTES_");
if ( noteCheck!= null
&& noteCheck.getValue() != null
&& noteCheck.getValue().getValue() != null
&& !noteCheck.getValue().getValue().equals("")) {
Note n = new Note(); Note n = new Note();
n.setText(stateText + "Supporting Resource changed with id: " + res.getId()); n.setText(stateText + "Supporting Resource changed with id: " + res.getId());
n.setAuthor( "SIM638-API" ); n.setAuthor( "SIM638-API" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment