• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups
    1 Kudo

    Enable scripting to add additional owners

    Status: Implemented
    by jamest on ‎12-20-2012 09:04 PM

    Hi All,

    I am not sure if this has been mentioned yet.

    Currently your outstanding tasks will show anything that you have the ability to change, this means that there is WAY too many items in the list then is relevant.

    My solution would be to allow a script to run (on item creation although doesn’t really matter) that would take the information from a user pick list field (let’s call it Assigned to) and add that person to the additional owners of the item.

    Then in the security settings do not give your users access to see items owned by others and hence leaving you with an outstanding items list that is relevant to you not your entire team.

    I understand that I could just add them into the additional owners manually however this is extremely frustrating as there is nothing to prompt you to do so and is often forgotten, if it is a field then I can make it required.

     

    Please!!! :smileyhappy:

     

    James

    Status: Implemented

    New Properties

    • item.master.owner  
    •  
      • User (the owner of the item)
      • Now Modifiable (previous versions it was just readable)
    • item.master.additionalOwners
      • an array of Users
      • readable and modifiable as a normal array 
    • item.master.groupAdditionalOwners  
      • an array of Groups
      • readable and modifiable as a normal array

     

         N.B. item.master, and item.master.owner already existed, but don’t appear to be documented.

     

    New functions

    • Security.loadGroup(String)  
    •  
      • Loads a group by its name

    Examples

     

     

    Make current user an additional owner

     

     

         var currentUser =Security.loadUser(userID);

     

         item.master.additionalOwners.push(currentUser);

     

    Make QA group an additional Owner

     

     

         var qa group = Security.loadGroup('QA’);

     

         item.master.groupAdditionalOwners.push(qa);

     

    Make ‘bob’ owner:

     

         item.master.owner=Security.loadUser(‘bob’);

     

     

    Comments
    by Employee jared.sund on ‎01-27-2013 09:04 PM
    Status changed to: Accepted
    This has been on my personal wish list for a while, let's see if we can get some movement on this!
    by Employee jared.sund ‎04-08-2013 07:43 AM - edited ‎04-08-2013 07:45 AM
    Status changed to: Implemented

    New Properties

    • item.master.owner  
    •  
      • User (the owner of the item)
      • Now Modifiable (previous versions it was just readable)
    • item.master.additionalOwners
      • an array of Users
      • readable and modifiable as a normal array 
    • item.master.groupAdditionalOwners  
      • an array of Groups
      • readable and modifiable as a normal array

     

         N.B. item.master, and item.master.owner already existed, but don’t appear to be documented.

     

    New functions

    • Security.loadGroup(String)  
    •  
      • Loads a group by its name

    Examples

     

     

    Make current user an additional owner

     

     

         var currentUser =Security.loadUser(userID);

     

         item.master.additionalOwners.push(currentUser);

     

    Make QA group an additional Owner

     

     

         var qa group = Security.loadGroup('QA’);

     

         item.master.groupAdditionalOwners.push(qa);

     

    Make ‘bob’ owner:

     

         item.master.owner=Security.loadUser(‘bob’);

     

     

    by jamest on ‎04-28-2013 12:17 AM

    i am just following up on these examples,

    i have been able to get the first one to work (userID), havent tried the second, however it the third one that bothers me.

    it is my understanding that i need to get the user as an "object"

    what i really need is to use a pick list and add additional owners based on that picklist selection, i dont really see the point if i cant do that.

     

    Thanks 

    James

     

    Announcements
    IdeaStation Guidelines
    Review guidelines and best practices
    before posting a new idea


    PLM 360 Survey