Skip to main content

Revisions and Archived

Comments

4 comments

  • Zendesk API User
    Author: kubczak - 9/24/2013 19:03

    Hi Benjamin,

    the runtime exception you get when trying to load the element is exactly the information you need in general. In your example you make a call to the revisionElementAgent to load an element of a specific revision which is correct so far. If the project was archived before, e.g. using a "cleanup" schedule, the element maybe is truely non-existent within this revision. This depends on the settings of your archive-task, of course (what is when to be archived, etc.).

    Therefore you'll get a runtime exception saying that there is no such element at all while trying to load it. As this is quite a dynamic information only available at runtime there's no special method to claim this infomation from a persistent state. You simply have to handle the exception. Another (old) way of loading an element of a specific revision would be using the UserService you can receive from the Project. Anyway the behaviour is exactly the same in this case throwing a runtime exception you'll have to handle...

    Anyway I also tested to reload deleted elements within a custom client connection from an IDE. In that case all I got was a "null" element without any exception. Handling the exception and see if the resulting element is not null would be a safe bet though.

    Best,

    Christian

    0
  • Zendesk API User
    Author: maaroufi - 9/26/2013 15:11

    If you simply want to restore an element you might also be interested in:

         de.espirit.firstspirit.access.AccessUtil.restore(...)

    Yours sincerely

    Ismail    

    0
  • Zendesk API User
    Author: benjamin_nagel - 9/26/2013 15:12

    Hello,

    thank you very much for your replies. I will check it tomorrow and reply as soon as possible.

    Kind regards

    Benjamin

    0
  • Zendesk API User
    Author: MichaelaReydt - 10/10/2013 10:38

    Hello Benjamin,

    did the replies solve your questions or do you need further help?

    Best regards

    Michaela

    0

Please sign in to leave a comment.