cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enable un-archiving of items via scripting

Enable un-archiving of items via scripting

We use a top-level workspace with workflow to track individual projects, and other workspaces with workflow to track specific sub-processes.


The top-level workflow has linking pick lists for selection of the sub-process workflows.

 

When a top-level workflow is cancelled, we use an action script to archive any incomplete sub-process workflows.

 

In instances where a top-level workflow is re-instated, re-instating the sub-process workflows is a manual and time-consuming task.

 

As I understand it, when an item selected in a linking pick list is archived, the link is still there and accessible by scripting, but is not visible in the front end.

 

If scripting was able to also unarchive the item, it would allow the cancellation process to be reversed easily.

 

I suggest modifying the existing .deleteItem() command to act as a status toggle. If it is applied to an item that has already been archived, the command should return it to a live state.

1 Comment
oussama.elaamouchi
Contributor

This sounds reasonable. Additional to that, an scripting function to check the current state of the item if it is archived or not would be helpful in cases like this.

It would be sufficient to get an boolean value from the additional function which could be something like:

 

item.descriptor.archived

Is the current item archived? (1 = True; 0 = False).

 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea