Unique Document Number / ID

Developers
PMan
2011-08-10
2013-03-22
  • PMan

    PMan - 2011-08-10

    Greetings!

    This is a feature request;  I would like a keyword (really an additional field) in docMGR that displays the item ID (it shows up in the url of the document).  Asking a user to look in the url is less than user friendly.  We do technical documents as part of projects, and it would be great to have a unique document number.  This would be listed on the drawing itself.  That makes it a lot easier to pull up the document when edits need to be done.

    If implemented as a keyword, it would be a display option. I would be happy to see it as a standard field in the object properties screen.

    A search field "Object ID" would need to be added as well.

    Thanks for a great piece of software!

    I'm running it on a 64 bit FreeBSD 7.2 server with Postgres 9.

    Regards,
    Paul

     
  • Eric Lawman

    Eric Lawman - 2011-08-11

    Just to be clear, you wanted this in the object properties page?  Or in the document editor?

     
  • PMan

    PMan - 2011-08-11

    In the object properties page.

    Thanks for the quick response!

     
  • PMan

    PMan - 2012-01-02

    Greetings;

    How can I add a field to display the "Object ID" in the object properties page?

    I'm guessing  that it's not much code, but I don't know what to add, or what file to add it to.

    Thanks in advance!
    Paul

     
  • Eric Lawman

    Eric Lawman - 2012-01-05

    Sorry!  We had an ongoing condo and I never responded!  Sigh, it's been a long year.

    Drop this into the modules/center/docmgr/proplib/properties.js file

    function showObjID()
    {
        var cell = ce("div","propCell");
       cell.appendChild(ce("div","formHeader","","Object ID"));
       cell.appendChild(ce("div","objectIdCell","",objinfo.id));
      return cell;
    }

    Then, starting at line 15 of the same file, you'll see a bunch of content.appendChild lines.  Just
    insert "content.appendChild(showObjID());" in between one of the existing lines, depending on where
    you want it, and refresh the page.

    Eric

     
  • PMan

    PMan - 2012-01-06

    Thanks Eric,  it works perfectly!

     
  • PMan

    PMan - 2012-01-08

    Greetings Eric;

    I hope this year is less stressful!

    I would like to be able to search for a document based on it's ID.
    Best case scenario would be if I could add a search criteria for Object ID.
    2nd best (more complicated), would be a script that loads the object ID into a keyword during the initial save.
    - Thinking out loud… that's not good because (a) it's complicated, and (b) it's redundant.

    So how would I add a search criteria for object ID?

    Regards,
    Paul

     
  • Eric Lawman

    Eric Lawman - 2012-01-18

    Try this:

    around line 229 of the apilib/lib/docmgr/lib/search_function.php file, add something like

    if (is_numeric($string))
    {
    $sqlArr = "SELECT id FROM docmgr.dm_object WHERE id='".$string."'";
    }

    I tested this out and it worked fine.  You will be limited to whether or not you are searching in the current folder, or everywhere, depending on your search parameters. 

    I'll just leave it in so the functionality will be there for the next release.

    Eric

     
  • PMan

    PMan - 2012-02-06

    Greetings Eric;

    I added the above code in apilib/lib/docmgr/lib/search_function.inc.php and it didn't work (no errors, but it doesn't pull up any files from the object id). I moved DocMGR to a cPanel VPS instance, and I've been having other issues, so maybe this issue is related as well.

    I'm looking into changing to mod_php (not sure if I can on this VPS, but I'll try). In the meantime, it seems that mod_php is a requirement for DocMGR at this time.

    Regards,
    Paul

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks