A created a user mimi in 4.1 the Role: Geographic/Facility access, Now i can select value, but only rcountry - region , I cannot see the Facility in select value, also unable to see the requested page

Bug #893937 reported by josephat mathayo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
I2CE
New
Undecided
Unassigned

Bug Description

mathayo@Limi:~$ sudo /var/lib/iHRIS/lib/4.1.1/I2CE/tools/apache_tail.php 0
[sudo] password for mathayo:
[Wed Nov 23 13:11:24 2011] [error] [client ::1]
 Refered by : http://localhost/manage-eastern/index.php/logout
 I2CE: I2CE->raiseError (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/BackgroundProcess/I2CE_BackgroundProcess.php:98)
       I2CE_BackgroundProcess->launchBackgroundProcess (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/BackgroundProcess/I2CE_BackgroundProcess.php:163)
       I2CE_BackgroundProcess->launchBackgroundPHPScript (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/BackgroundProcess/I2CE_BackgroundProcess.php:180)
       I2CE_BackgroundProcess->launchBackgroundPage
       call_user_func_array (/var/lib/iHRIS/lib/4.1.1/I2CE/lib/I2CE_Fuzzy.php:57)
       I2CE_Fuzzy->__call (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/CustomReports/lib/I2CE_Module_CustomReports.php:132)
       I2CE_Module_CustomReports->launchBackgroundPage (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/CustomReports/lib/I2CE_Module_CustomReports.php:132)
       I2CE_Module_CustomReports->refreshGenerates (/var/lib/iHRIS/lib/4.1.1/I2CE/lib/I2CE_ModuleFactory.php:741)
       I2CE_ModuleFactory->_callHooks (/var/lib/iHRIS/lib/4.1.1/I2CE/lib/I2CE_ModuleFactory.php:728)
       I2CE_ModuleFactory->callHooks (/var/lib/iHRIS/lib/4.1.1/I2CE/lib/I2CE.php:636)
       I2CE->bringUpSystem (/var/lib/iHRIS/lib/4.1.1/I2CE/lib/I2CE.php:609)
       I2CE->initializeDSN (/var/lib/iHRIS/cssc_zonal_deploy/sites/eastern/pages/index.php:49)
 Starting background process: (sh -c ''\\''/usr/bin/php5'\\'' '\\''/var/www/manage-eastern/index.php'\\'' --page=/CustomReports/generate --nocheck=1 > '\\''/tmp/I2CE_BackgroundProcess'\\''/process.78332.log 2>&1 &echo $!')
 Working directory is (/var/lib/iHRIS/cssc_zonal_deploy/sites/eastern/pages)
 Log file is stored at '/tmp/I2CE_BackgroundProcess'/process.78332.log
[Wed Nov 23 13:12:09 2011] [error] [client ::1]
 Refered by : http://localhost/manage-eastern/index.php/user
 I2CE: I2CE->raiseError (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/User/lib/I2CE_User.php:568)
       I2CE_User->save (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Forms/modules/UserForm/lib/I2CE_User_Form.php:391)
       I2CE_User_Form->save (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Forms/lib/I2CE_PageForm.php:236)
       I2CE_PageForm->save (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Forms/modules/UserForm/lib/I2CE_PageFormUser.php:114)
       I2CE_PageFormUser->save (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Forms/lib/I2CE_PageFormBase.php:218)
       I2CE_PageFormBase->action_save (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Forms/lib/I2CE_PageFormBase.php:301)
       I2CE_PageFormBase->action (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Forms/modules/UserForm/lib/I2CE_PageFormUser.php:135)
       I2CE_PageFormUser->action (/var/lib/iHRIS/lib/4.1.1/ihris-common/lib/iHRIS_PageFormUser.php:43)
       iHRIS_PageFormUser->action (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Page.php:513)
       I2CE_Page->displayWeb (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Page.php:466)
       I2CE_Page->display (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Wrangler.php:89)
       I2CE_Wrangler->wrangle (/var/lib/iHRIS/cssc_zonal_deploy/sites/eastern/pages/index.php:60)
 User mimi does not exist, creating
[Wed Nov 23 13:13:13 2011] [error] [client ::1]
 Refered by : http://localhost/manage-eastern/index.php/CustomReports/view/reportViews
 I2CE: I2CE->raiseError (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Wrangler.php:198)
       I2CE_Wrangler->getPage (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Wrangler.php:74)
       I2CE_Wrangler->wrangle (/var/lib/iHRIS/cssc_zonal_deploy/sites/eastern/pages/index.php:60)
 Cannot find a class associated to the requested page show for the module CustomReports
[Wed Nov 23 13:13:13 2011] [error] [client ::1]
 Refered by : http://localhost/manage-eastern/index.php/CustomReports/view/reportViews
 I2CE: I2CE->raiseError (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Wrangler.php:77)
       I2CE_Wrangler->wrangle (/var/lib/iHRIS/cssc_zonal_deploy/sites/eastern/pages/index.php:60)
 Unable to create page from path (/CustomReports/show/search_people)
[Wed Nov 23 13:14:02 2011] [error] [client ::1]
 Refered by : http://localhost/manage-eastern/index.php/CustomReports/view/reportViews
 I2CE: I2CE->raiseError (/var/lib/iHRIS/lib/4.1.1/ihris-manage/modules/ManageAccessFacility/lib/iHRIS_Module_ManageAccessFacility.php:229)
       iHRIS_Module_ManageAccessFacility->userAccessWalkableForms (/var/lib/iHRIS/lib/4.1.1/ihris-manage/modules/ManageAccessFacility/lib/iHRIS_Module_ManageAccessFacility.php:208)
       iHRIS_Module_ManageAccessFacility->userAccessFacilityList
       call_user_func_array (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:677)
       I2CE_PermissionParser->parsePermissionsLogic (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:315)
       I2CE_PermissionParser->taskHasAlternateSatisfaction (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:370)
       I2CE_PermissionParser->hasPermission_task
       call_user_func_array (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:677)
       I2CE_PermissionParser->parsePermissionsLogic (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:232)
       I2CE_PermissionParser->hasPermission (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Template.php:461)
       I2CE_Template->checkRolesTasksAndPermissions (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Template.php:318)
       I2CE_Template->prepareDisplay (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Page.php:572)
       I2CE_Page->_display (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Page.php:540)
       I2CE_Page->displayWeb (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Page.php:466)
       I2CE_Page->display (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Wrangler.php:89)
       I2CE_Wrangler->wrangle (/var/lib/iHRIS/cssc_zonal_deploy/sites/eastern/pages/index.php:60)
 No data set on given node, giving permission
[Wed Nov 23 13:14:02 2011] [error] [client ::1]
 Refered by : http://localhost/manage-eastern/index.php/CustomReports/view/reportViews
 I2CE: I2CE->raiseError (/var/lib/iHRIS/lib/4.1.1/ihris-manage/modules/ManageAccessFacility/lib/iHRIS_Module_ManageAccessFacility.php:229)
       iHRIS_Module_ManageAccessFacility->userAccessWalkableForms (/var/lib/iHRIS/lib/4.1.1/ihris-manage/modules/ManageAccessFacility/lib/iHRIS_Module_ManageAccessFacility.php:208)
       iHRIS_Module_ManageAccessFacility->userAccessFacilityList
       call_user_func_array (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:677)
       I2CE_PermissionParser->parsePermissionsLogic (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:315)
       I2CE_PermissionParser->taskHasAlternateSatisfaction (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:370)
       I2CE_PermissionParser->hasPermission_task
       call_user_func_array (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:677)
       I2CE_PermissionParser->parsePermissionsLogic (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Permissions/lib/I2CE_PermissionParser.php:232)
       I2CE_PermissionParser->hasPermission (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Template.php:461)
       I2CE_Template->checkRolesTasksAndPermissions (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Template.php:318)
       I2CE_Template->prepareDisplay (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Page.php:572)
       I2CE_Page->_display (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Page.php:540)
       I2CE_Page->displayWeb (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Page.php:466)
       I2CE_Page->display (/var/lib/iHRIS/lib/4.1.1/I2CE/modules/Pages/lib/I2CE_Wrangler.php:89)
       I2CE_Wrangler->wrangle (/var/lib/iHRIS/cssc_zonal_deploy/sites/eastern/pages/index.php:60)
 No data set on given node, giving permission

Revision history for this message
josephat mathayo (jmathayo) wrote :

Does this related with I2CE_configurator.php
http://pastebin.com/6fyJZGPF

Revision history for this message
Carl Leitner (litlfred) wrote :

Please to try create bug reports on each separate issue. Having an "also unable to see the requested page" makes it hard to track the fixing of these issues.

I will work with this bug only on the first issue.

Cheers.
-carl

Revision history for this message
Carl Leitner (litlfred) wrote :

The geographic setup for CSSC is different than the default because it uses Zones. Because this is the case, you should probably not use the ManageAccessFacility module. Instead you should create a new module specific to CSSC.

Here is an explanation.

In the default way of defining the facility (not used by CSSC), the class for facility extends iHRIS_ListByLocation which is defined here:
  http://bazaar.launchpad.net/~intrahealth+informatics/ihris-common/4.1-dev/view/head:/modules/Geography/Geography.xml#L262
with:
 county:district:[region]:country
and selectable forms country and district as defined on lines 255-256

In the CSSC Facility module, you can see here
 http://bazaar.launchpad.net/~ihris+cssc/ihris-manage-cssc/4.1/view/head:/modules/Facility/Facility.xml#L172
how the geography is setup for CSSC as:
  cssc_village:cssc_ward:county:district:[region]:cssc_zone:country
This means that in the tree view for selecting the facility location, first we show country, then we show the zones, then we skip over the region and show the district, then we show the county, then we show the cssc_ward, then we show the cssc_village.

On lines 148-151 we see that the forms we are allowed to select for the facility location are cssc_village, cssc_ward, country and district (Note... I think that country is a typo here and it should be county).

To make things work for CSSC, you should copy the ManageAccessFacility module from here:
  http://bazaar.launchpad.net/~intrahealth+informatics/ihris-manage/4.1-dev/files/head:/modules/ManageAccessFacility/
into the CSSC customizations. You will then want to modify it to work for CSSC. Here are the steps you would need to take:

1) In the .xml file, you should all references to ManageAccessFaciltiy to CSSCAccessFacility so there is not naming conflict.

2) In the .xml file you should replace lines 157-161 with the forms that you want to be able to select for the user. These are probably facility, cssc_village, cssc_ward,county,district,cssc_zone,country

3)In the .xml you should replace line 167 with something like:
facility+location:cssc_village:cssc_ward:county:district:[region]:cssc_zone:country

4) in the lib directory, rename the file iHRIS_Module_ManageAccessFaciltiy.php to iHRIS_Module_CSSCAccessFacility.php. Also edit this file to rename the class from iHRIS_Module_ManageAccessFaciltiy to iHRIS_Module_CSSCAccessFacility

Revision history for this message
josephat mathayo (jmathayo) wrote :

Thanks Carl for thr guidance, Let me proceed. I will give you a feedback

Revision history for this message
josephat mathayo (jmathayo) wrote : Re: [Bug 893937] Re: A created a user mimi in 4.1 the Role: Geographic/Facility access, Now i can select value, but only rcountry - region , I cannot see the Facility in select value, also unable to see the requested page

Dear Carl

I created a module CSSCAccessFacility at cssc_zonal_deploy and added
to the ihris-manage-cssc requirement as CSSCAccessFacility as defined
in I2CE_configuration. I did this in 4.0.19. I changed the vesrion to
4.0.9 and at least 4.0 and less than 4.1. After enabling the module.
This errors i am getting. Does this form relationship permission
available in 4.1 and not in 4.0.19, could the be cause

Your idea on this: http://pastebin.com/26Zt75na

On 11/23/11, josephat mathayo <email address hidden> wrote:
> Thanks Carl for thr guidance, Let me proceed. I will give you a feedback
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/893937
>
> Title:
> A created a user mimi in 4.1 the Role: Geographic/Facility access, Now
> i can select value, but only rcountry - region , I cannot see the
> Facility in select value, also unable to see the requested page
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/i2ce/+bug/893937/+subscriptions
>

--
======================================
ICT Officer
Mathayo Josephat
Christian Social Services Commission
AfyaMtandao / Tanzania Human Resource Project
P.O Box 9433
Dar es Salaam
Tanzania.

Email: <email address hidden> /<email address hidden>
Mobile: + 255 754 940 636 / 712 191 192
website:
www.cssc.or.tz
www.afyamtandao.org
======================================

Revision history for this message
Carl Leitner (litlfred) wrote :

The relevant error message is on line 178 of the pastebin, which says "Installation failed: Requirement form-relationship-based-permission by CSSCAccessFacility is not available"

This module is defined in version 4.1 at I2CE/modules/Forms/modules/FormRelationshipBasedPermission/FormRelationshipBasedPermission.xml

However, looking at your error message, you are trying to install the CSSCAccessFacility on top of 4.0.19. You cannot do so, you need to use the 4.1 series.

Revision history for this message
josephat mathayo (jmathayo) wrote :

On 11/29/11, Carl Leitner <email address hidden> wrote:
> The relevant error message is on line 178 of the pastebin, which says
> "Installation failed: Requirement form-relationship-based-permission by
> CSSCAccessFacility is not available"
>
> This module is defined in version 4.1 at
> I2CE/modules/Forms/modules/FormRelationshipBasedPermission/FormRelationshipBasedPermission.xml
>
> However, looking at your error message, you are trying to install the
> CSSCAccessFacility on top of 4.0.19. You cannot do so, you need to use
> the 4.1 series.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/893937
>
> Title:
> A created a user mimi in 4.1 the Role: Geographic/Facility access, Now
> i can select value, but only rcountry - region , I cannot see the
> Facility in select value, also unable to see the requested page
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/i2ce/+bug/893937/+subscriptions
>

--
======================================
Hi Carl
I agree yes, in 4,1 it does not work, Yesterday i shared to Luke as
you was not there? But in 4,1 it works now, The big problem is it does
not limit th report you want to see according to the user created and
the facility access eg St Francis etc

But i did not commit the changes of the CSSCAccessFacility Module
under cssc customization

Revision history for this message
Carl Leitner (litlfred) wrote :

did you copy them over? it does seem to think it is there.

Revision history for this message
josephat mathayo (jmathayo) wrote :

what do you mean?

Revision history for this message
josephat mathayo (jmathayo) wrote :

Oh i copied to cssc_zonal_deploy/modules and renamed all the files as suggested and created in ihris-manage-cssc/ihris-manage-cssc,xml

Just disabled the ihris-manage - ManageAccessFacility under ihris-manage and instead enabled the CSSCAccessFacility

Revision history for this message
josephat mathayo (jmathayo) wrote : Invitation to connect on LinkedIn

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Mathayo

Mathayo Josephat
ICT Consultant at MARO Technology Limited
Tanzania

Confirm that you know Mathayo Josephat:
https://www.linkedin.com/e/clxvrp-hqkm9tea-48/isd/19428948177/MPe4Ah2A/?hs=false&tok=27ulHTVL__w641

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/clxvrp-hqkm9tea-48/Aa70ABFqhyhlrCyRWezM6mzq3EORwvS-Y0xRaBA/goo/893937%40bugs%2Elaunchpad%2Enet/20061/I6296821467_1/?hs=false&tok=0KxvS8YFT_w641

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.