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

Adding questions to existing template

When adding a required question (for requester or approver) to an existing template all requests submitted prior and with approvals in place, the request can't be processed by the approvers because the question on prior requests before the change weren't answered.

If I create a new template and replace the existing templates on the same catalog item for both the requester and approvers, will the requests submitted prior have the same problem or will this only affect new request submitted after the change?

We use requester templates and approver templates and have alot of pending approval requests in the database that I don't want to impact.  We use the catalog item for review of new software for the environment.  I

(1) Solution
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Teri,
   Sorry for the delays in responding.. While it seems to be an easy question on the surface, the approval process and the questions associated with the approval is a bit difficult to understand.. From what I'm seeing, I think that you should be OK if you were to create a completely new question template, and attach the new question template to the existing approval process. Looking at the QuestionTemplateID_FK column in the WD_ApprovalProcess table, I see that App Portal is referencing the question template ID, so if you change the template ID new requests should use the new template ID, and old requests should still reference the old question template..  I know that there are many variables involved here, so this might not hold true in all scenarios.  Changing the question template seems to work correctly in my environment, however. 

Thanks

Charles

View solution in original post

(11) Replies
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

Teri,
   Sorry for the delays in responding.. While it seems to be an easy question on the surface, the approval process and the questions associated with the approval is a bit difficult to understand.. From what I'm seeing, I think that you should be OK if you were to create a completely new question template, and attach the new question template to the existing approval process. Looking at the QuestionTemplateID_FK column in the WD_ApprovalProcess table, I see that App Portal is referencing the question template ID, so if you change the template ID new requests should use the new template ID, and old requests should still reference the old question template..  I know that there are many variables involved here, so this might not hold true in all scenarios.  Changing the question template seems to work correctly in my environment, however. 

Thanks

Charles

That worked.  Thanks so much!

Charles,

 

I thought this had worked but what I'm finding is all the requests, even one previous submitted show that there are unanswered questions, yet when we go to the unanswered questions tab there are none.  My approvers are getting a message when they try to approve that says there are unanswered questions.

The questions we had added to a new template were required for the requester but it somehow seems to have corrupted something else.  I reverted to the old template that didnt have the questions and that also didn't work.  I've ran queries on approval process and looking for IsAnswered 0 and getting nothing.

Any ideas or query to find this?  

 

Teri,
I "believe" that it is the HasPendingQuestions column in the WD_packageRequests table which would cause this behavior. When you were testing, were you changing the template at the catalog item level? I'd be curious to know if you see this column being set to 1 after you make a change to your template.. I think that if this is set to 0 for the request, then App Portal will not check to see if the questions have been answered..

Thanks Charles.  That works for removing the requiredness - where I'm still a little stuck and not able to figure out is why new requests have the HaspendingQuestions column set to 1 even though I reverted the original template and and all required questions are answered.

For now, I'm updating the column but am still trying to find out where the connection is between the request and the template that is setting the column to 1

What version of App Portal are you on?  There were some issues related to approver questions where either non-required questions were being seen as required or required questions for a specific approver level were being marked as required for the other levels, even though the other levels couldn't see the questions.  I had gotten a hotfix for this against 2017 R2 SP1, but I don't see any record of it having been added to future releases, so perhaps this is still an issue.

@CharlesW - AP-12056 for reference

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

We're on 2019 R1 currently.  We do use approver questions in their own template in the approver workflow.  All approver questions are optional.

Can you give me a rundown of the steps you are taking to reproduce this? Give me an overview of the existing question templates that are applied, and provide info on what template is being modified (is it the template on the catalog item, or on the workflow)? As mentioned there are quite a few possible scenarios, so I think that I may need to reproduce exactly before I can (possibly) offer a workable solution. Not sure if the "fix" which Jim mentioned would be applicable to your scenario or not.. I can say with certainty that it has not been included in 2019 R1 (or R1 SP1).

We have 4 general catalog items and they each had the same question template for requesters. They have about 26 required questions - some single line text, some multiline, some radio button with yes/no and some conditional questions where if the requester answered yes, then a couple other questions are shown.

We have multi-level workflow on these and the first level approvers had their own template on the workflow with all optional questions).

The approvers at level 1 who review these wanted to add additional required questions to the requester but I wasn't sure if we could do that so our first step was to create a new template for the approvers and add two required questions, one radio button yes/no and the other a drop down list. I changed the template on the approver workflow to the new template with the additional required questions. That seemed to be ok.

After it looked like I could create a new requester template and add the required questions I created a new template and added 4 required questions (one radio button yes/no, one single line text, one required checkbox and one required drop down). I removed the old template from the catalog items, added the new template and saved. I reverted the old approver template with no required questions back to the level 1 workflow. I checked approval process in the database and all looked fine until the approvers tried approving and received the message that there were unanswered questions.

Tha'ts where I am right now.  If I look at the unanswered question tab there are no required questions so I have been going in and setting HasPendingQuestions to No for now so they can move forward with their approvals.

Still kicking this one around.. I just tried switching the template at the catalog item level with a new template which had new required questions, and I did not see any issues. I was able to approve and existing request, even though there was a new required question in the new template. The hasPendingQuestions column in WD_PackageRequests did not change.. It remained set to 0. I still must be testing a different scenario than you are...

I did change it at the catalog item level and then checked the approval process and it looked good, until the approvers started to approve.  Is there a way to differentiate between the approver questions and the requester questions if I look at Has Pending Questions?  My approvers have questions but they are not required like the requester questions are and I have 4 level approvals.