Maximo Open Forum

 View Only
  • 1.  Missed attachments from Asset application

    Posted 07-22-2021 10:31
    Hello All,

    We have faced a strange scenario where recently we observed that there have been couple of cases where the attached documents are missing from assets and we confirmed the same as one of our development environments was not refreshed since a long time and we could see the documents attached in the assets which the user reported.

    Also,the user confirmed that there is no way that they could have deleted the attachments as there are lot of assets and they have not done it even by mistake also.


    We checked the attachments on the server and we can see that the documents does exist in the attachments directory but they are no longer linked to the assets.What can be the way to solve this issue as a temporary work around,do we have to run an insert query on doclinks object and proceed?Also,how many objects would have got affected as we would have to prepare the necessary scripts.

    Also,our challenge is how to find out the missing assets and other objects(work orders,locations,etc) where the attachments could have possibly got removed.

    Kind assistance required.
    #EverythingMaximo

    ------------------------------
    Mahadevan Ramakrishnan
    ------------------------------


  • 2.  RE: Missed attachments from Asset application

    Posted 07-23-2021 09:40
    This is what I would do:
    1. Get a list of all the docs currently attached.   Something like "Select urlname from docinfo;"
    2. Get a filesystem list of the files on the doclinks. Something like "cd /doclinks && find "$PWD" " (or the equvalent for your OS)
    3. Run a diff against both lists. This should provide a list of all the documents that exist on the file system but are not attached.
    4. Check the docinfo table on your old filesystem to see if these documents exist in there. If they do, export the entries and (after validating), import them into prod.
    5. Provide the remaining list to subject matter experts so they can manually attach them, or so they can tell you what asset/location/workorder/ the attachment belongs to.

    Good luck!

    ------------------------------
    Jorge Collado
    Orange County Utilities
    ------------------------------



  • 3.  RE: Missed attachments from Asset application

    Posted 08-06-2021 09:32
    Edited by Danielle Shaw 08-06-2021 22:09
    Can you look at an example and see if there is a docinfo record for that file (look by urlname) and then see if there are any doclinks tied to it - by looking at the docinfoid on the DOCLINKS table? Could you have any customization that is meant to be deleting attachments - such as in an automation script - after a certain amount of time or something like that? Is it possible the relationship from asset > doclinks was changed and things are not showing up now that were before? I'd compare the doclinks records in your prod and non-prod to see if they have actually been removed.

    To verify no one is doing this manually you could turn on e-audit for DOCLINKS and/or DOCINFO as well.

    If you find the file in docinfo and it's not in doclinks, you could do an insert query into doclinks. If it's not even in docinfo you will need to insert there as well. 

    I like the above recommendation for finding what's missing. I've even done an Excel workbook where I copy the url names from the DOCINFO table into into one spreadsheet, and then copy the paths from the server where the files are stored and put them in another spreadsheet (in Windows you can even select all files and then click the "Copy path" button in File Explorer), then use a vlookup formula to see if a file exists in docinfo but not on the server or vice versa. But if your files are still in the DOCINFO table but are being removed from doclinks, and you have attachments that are used in multiple places (meaning many doclinks records but just one docinfo), it will be difficult to tell what's been removed, but you can use your non-prod as a comparison point (even though you say it's an old copy).

    ------------------------------
    Danielle Newhouse
    ------------------------------