Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone know how to write a SQL to update to the package notes tab?

Highlighted
bzdafro
Collector

Does anyone know how to write a SQL to update to the package notes tab?

I would like to run a script that can add a comment to the Notes tab (ie, package notes section).   From JDBC debug it looks like its inserting to KNTA_NOTE_ENTRIES.    Has anyone done this from object type / commands?

 

 

NSERT INTO KNTA_NOTE_ENTRIES(
  NOTE_ENTRY_ID, CREATION_DATE, CREATED_BY, LAST_UPDATE_DATE, LAST_UPDATED_BY, PARENT_ENTITY_ID, PARENT_ENTITY_PRIMARY_KEY, AUTHOR_ID, AUTHORED_DATE, NOTE_CONTEXT_VALUE, NOTE_CONTEXT_VISIBLE_VALUE, NOTE, TRANSACTION_NOTE_FLAG) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)
  ]]>

 

 

I also see this in the debug 

<param-12>
   oracle.sql.CLOB@11805a8
  </param-12>

 

 

 

 

 

 

4 REPLIES
Celil
Esteemed Contributor

Re: Does anyone know how to write a SQL to update to the package notes tab?

Hi,

You know, it's not supported way. I recommend you do that over OOTB DB functions.
Celil

IT Governance Professional
& PPM Solution Architect
bzdafro
Collector

Re: Does anyone know how to write a SQL to update to the package notes tab?

Hi

 

I never found a way to get this to work.   I would like to write data to the notes tab from a package command.   Is anyone doing this using OOTB DB functions?    I can't seem to figure this one out.  

 

 

Jim Esler
Honored Contributor

Re: Does anyone know how to write a SQL to update to the package notes tab?

We use the following to add a note to a request. Something similar may work for a package note.

 

    insert into knta_note_entries
(note_entry_id, creation_date, created_by, last_update_date, last_updated_by, parent_entity_id, parent_entity_primary_key, author_id, authored_date, note_context_value, note_context_visible_value, note)
Values (knta_note_entries_s.nextval, SYSDATE, '[REQ.CREATED_BY]', SYSDATE, '[REQ.CREATED_BY]', '20', new_note.request_id, '[REQ.CREATED_BY]', SYSDATE, '[REQ.STATUS_ID]', '[REQ.STATUS_NAME]',' <note text>' from dual)
);

jsalass
Frequent Visitor

Re: Does anyone know how to write a SQL to update to the package notes tab?

Hi bzdafro,

 

The key here is to know the entity type where you want to add the note.

 

So here is the list of entities in PPM:

 

select * from knta_entities
order by entity_id

 

-- For Packages entity id is 1

select * from knta_entities where entity_id=1

So, you can check in the KNTA_NOTE_ENTRIES records for packages using this query:

 

select * from KNTA_NOTE_ENTRIES where parent_entity_id=1 --and parent_entity_primary_key=<id of a specific package>

 

So, you can use the SQL Jim provide above and change the parent_entity_id to 1 and parent_entity_primary_key to the id of the package you want to add the note.

 

PD: Updates from the backend are not supported, so test any change in your TEST instance first. Also, you can add notes in workbench. Just open the package, click in the Notes tab and add the note you need.

 

Hope this helps!

 

Regards,

Jonathan

(Remember to mark the topic as solved and provide kudos if a post answered your query)

//Add this to "OnDomLoad" event