Restrict creation of Project of Template if Demand is empty

bhanu27
Tera Expert

Hi All,

 

I have a requirement that is, to restrict project managers to create New Projects from project template(create project from Template) option, if the project demand is empty.

Generally project is created from IDEA-Demand-Project.

So i need to restrict directly creation of new project if demand is empty, using Business rule i have and restricted creation of projects from VTB's, project workspace but not able to restrict from project templates.

 

Please help me in this.

 

Thanks,

Bhanu.

2 REPLIES 2

Akash4
Kilo Sage
Kilo Sage

Hi Bhanu,

I wonder why BR can’t help us here since its an insertion to the database of particular table (even though we use templates). I did not test but guessing this.

Try this simple script onBefore Insert (incase the other BR have more configs):

var demand = current.demand; //demand field name here

if (!demand) {
gs.addErrorMessage(“Cant create a new project without associated Demand”);
current.setAbortAction(true);
}

 

Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.

Hi @Akash4 ,

 

Thanks for the response, i have tried the same way used similar business rule, it has not worked to restrict the creation of project from Template.

with this BR i can able to stop creating new project from VT, Workspace, Create new project UI action button, but can't restrict from Create project from Template, copy project, copy partial project ui actions.

 

Thanks,

Bhanu.