Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Javascript Alerts

SOLVED
Go to solution
Highlighted
Soniya Ahuja
Occasional Contributor

Javascript Alerts

There are some errors that come up as javascript alert messages in a pop up. I can't find the configuration for these alerts. Where are the error messages written? Also where are such alerts configured? I checked Rules as well but could not find them.
8 REPLIES
Mahen M
Honored Contributor

Re: Javascript Alerts

Hi Soniya,
Can you please paste the Javascript alers here?

Usually you can find the execution in the server log. Set Debug=True. And try to recreate the alert again and after that you can look at the server log files for more information.

Regards,
Mahendran M

Regards,
Mahendran M
Soniya Ahuja
Occasional Contributor

Re: Javascript Alerts

hi,

I am attaching the alert.

These messages are part of the Messages.js file but not really sure whether they come from some configuration.
Mahen M
Honored Contributor

Re: Javascript Alerts

Hi Soniya,
This is a save bug. If you have a field mandatory in a status and when ever you try to save the request by updating any value (Other than this field) or notes without filling this this particular field or if you try to click the action button this popup will come up.

If you want to avoid this popup, I have a solution, If yor question is something else please let me know.

Thanks

Regards,
Mahendran M

Regards,
Mahendran M
Soniya Ahuja
Occasional Contributor

Re: Javascript Alerts

I figured out that this coming from the Mandatory Field. Actually, since the other validations are customer specific, I could not paste them directly. You see that this field is mandatory and we can configure that. We have some fields, like suppose 5 percentages fields. Some or all of them can be populated however their sum should be 100. Now what happens is that, we get an error message in situations where percentage != 100. This message comes from a rule and is displayed in the percentage section.

This message however, does not restrict the user from going ahead and saving the project. We want to mandate that the percentage sum should be 100

However, we get a script alert only when the sum > 100. This stops the user from saving project. But a condition of sum < 100 has no javascript error associated and the user can save the project.

I hope that the scenario is some what clear.
Darshan Bavisi
Occasional Visitor
Solution

Re: Javascript Alerts

Hi Soniya,

We had the exact problem, where the rule can check only >100 and 100, but not <100, and if <100 then user could save the request and the workflow would move to the next step. We created a workaround for the same, which worked perfectly fine and is as below,

1. Create a read-only field above or below your percent total field (where you need to display 100%). In this field just give message to the user, that if the field is does not equal 100 then the workflow will be routed back to the same user and won't move to the next step.

2. Then we created an execution step after this decision step, where we used to see if the value in this field is 100 or not, then we route the workflow back to the previous step, i.e. to the same user, if not 100.

3. In the execution step if the value in this field was 100, then only we moved the workflow to the next step.

We also used the numeric field instead of % field. This was in 7.1, I haven't tried it yet in 7.5 for any alternate solutions.
Soniya Ahuja
Occasional Contributor

Re: Javascript Alerts

Hi Darshan,

The workaround looks good. I'll try it out. But may I ask if you know from where does the javascript alert take messages? Or based on which rules, etc. are they generated.
jyotir_2
Super Collector

Re: Javascript Alerts

Hi Soniya,

In the earlier version of PPM(7.0&7.1) and ITG all these Java script alerts were availble in the differnt-2 location in file system as per the categories.All these alerts were bases on the field masking and checking null value or some time dependencies.

After moving to PPM 7.5 in demand Managament we have got new feature of UI Rule.In which we can also call different behaviors availble in RequestRulesSystemLibrary.js and RequestRulesUserLibrary.js files.We can also add more scripts in RequestRulesUserLibrary.js as per our requirement.

For the rest of the module you can find many .js file present in the file system serving differnt purpose.

Regards,
Jyotir
Darshan Bavisi
Occasional Visitor

Re: Javascript Alerts

Hi Soniya,

Almost all of the PPM error messages are stored in these three locations,

1. Database table - Run query SELECT * FROM KNTA_MESSAGES and you will see all the error messages with its corresponding error codes. So you can modify the error messages in this table to suit the end user needs.

2. JavaScript files - I didn't get chance to see the specific .js file you are looking for, but the previous post by 'jyotir' mentions some of the .js. Also, you can open the .jsp of whichever page where you want to find the .js of, and then you will see the .js references in that .jsp file. Sometimes these .jsps or .js may refer to another files in chain and you will need to keep opening each of them to finally get the actual .js from where you are getting this message.

3. Java files - This I believe is least used for storing the end user related messages, but some debugging messages can be found in java files. For this you need to decompile the .class files to see the messages.

But to say, whichever message you want to customize, may be getting used at other places also in the application and may impact messages at other places. Also, this will lead to customization of the core files that may impact every time you apply a Service Pack or do a version upgrade. And you may need to reapply the customization and again test everything thoroughly. If end users can be convinced on the effort and recurring efforts required on this, probably not doing customization may be the best option as far as possible.
//Add this to "OnDomLoad" event