Changing project setting from backend

Hi Team,

We are working through a requirement where we have to change the below project setting from backend. Did anyone happen to work this out before or similar where a project setting is changed from backend?

thanks

  • 0  

    Hi Avinash,

    The table you're looking for is ITG_SETTINGS_ATTRIBUTES, look for NAME column with value "CFS.forecastedSPLaborCosts" - you should set the "value" column to "true" if you want this checkbox to be checked. However, finding which row in this table relates to which project is not so straightforward:

    1) Open your project, and note the Project ID in the URL - this is NOT the project number!

    2) in table pm_project_type, look for the row where PROJECT_ID matches your project id, and look for the corresponding column "pt_settings_key"

    3) You can now find the right row in ITG_SETTINGS_ATTRIBUTE to edit by looking in table itg_settings_cont_attrs for the row wihere the settings_container_id is the value of the "pt_settings_key", and the ATTR_MAP_KEY column is "CFS.forecastedSPLaborCosts". This will give you the SETTINGS_ATTRIBUTE_ID value to look for in the table ITG_SETTINGS_ATTRIBUTES - you can double check that name matches ("CFS.forecastedSPLaborCosts")

    Note that editing this value directly in database is not officially supported, however I'm not aware of any REST API available to make these changes programmatically in a supported way - so, go for it at your own risk.

  • 0 in reply to   

    Hi Etienne,

    Thank you for your response. I have already tried this using below query. The value does get updated (setting it to false) and I can see that in UI. However, the system doesnt considers this change. On the next run of the service (SP and FS sync) the lines in FS from SP doesnt go away. Infact if we change something in SP, FS gets updated accordingly even though the settings is unticked. We could be missing update to some other table as well. 

    UPDATE ITG_SETTINGS_ATTRIBUTES
    SET VALUE = 'false',
    LAST_UPDATED_BY = 1,
    LAST_UPDATE_DATE = sysdate
    WHERE 1=1
    and SETTINGS_ATTRIBUTE_ID in (
    select SETTINGS_ATTRIBUTE_ID from itg_settings_cont_attrs
    where settings_container_id = (select pt_settings_key from pm_project_types where project_id = 33970)
    and ATTR_MAP_KEY = 'CFS.forecastedSPLaborCosts' )

    Thanks

    Avinash

  • 0   in reply to 

    The only other two changes I can think of when updating project settings are inserting a row into itg_audit_events, and updating the last_update_date of the corresponding row in table pm_project_type.

  • 0 in reply to   

    Thanks Etienne.

    Did that too but no luck. updated last updated date of all requests tables as well. the only difference is sequence value of ITG_AUDIT_EVENTS_S when inserted manually is significantly less when system is automatically entering. But I believe that should not make any difference.

    Seems running out of options here.