BiologicalRecordsCentre / BSBI-Card-and-PlantPortal-DEPRECATED-

A portal to promote plant recording and analysis of plant data
0 stars 0 forks source link

Code Update Requests #47

Closed andrewvanbreda closed 5 months ago

andrewvanbreda commented 7 years ago

Nested in #46

Biren: I have attached the zipped version of the file that should be used as the config file for the indicia_svc_plant_portal_import folder on the dev warehouse. Could you move it across whenever you get a chance

plant_portal_import.php.zip

BirenRathod commented 7 years ago

This has done.

andrewvanbreda commented 7 years ago

Hi Biren,

I am still having a little trouble with this still, am seeing errors, I think I know the trouble and it is my fault. I think what has happened is the plant portal code and the reports_for_prebuilt_forms/plant_portal folder on the dev warehouse are out of sync because that reports folder is not up to date (actually it might not exist at all as I originally forgot to commit it). Are you able to get that folder from the "feature-plant-portal-quadrat-module" branch?

Optionally if you have time, the following files have been updated in the feature-plant-portal-quadrat-module with new code, so could be updated. But only if you have time for now.

1. In the warehouse indicia_svc_plant_portal_import/controllers/services/plant_portal_import.php

  1. In iform prebuilt_forms/plant_portal_user_data_importer.php prebuilt_forms/plant_portal_user_data_importer.js

Thanks

Andy

andrewvanbreda commented 7 years ago

Hi Biren,

Ignore the above requests now as there will be another release in next few days, so not worth dealing with previous one now. I will let you know when new code is ready

andrewvanbreda commented 7 years ago

Hi Biren, I have a new release of plant portal. All the changes are in the develop branches of the warehouse and iform. Are you able to update the dev warehouse and plant portal dev site to the latest dev code, or do you prefer me to give you a list of what files need updating exactly?

BirenRathod commented 7 years ago

Hello @andrewvanbreda No, I'm fine with that. I will let you know once it has done. I will update warehouse today possibly and iform earlier next week.

andrewvanbreda commented 7 years ago

OK no problem

andrewvanbreda commented 7 years ago

Hi Biren, John needs to get me to revert the Develop branches because he needs to do a release to iRecord. Is it possible to do the plant portal updates on the client helpers and warehouse from the feature-plant-portal-may-build branches instead? (as these contain the new import code)

BirenRathod commented 7 years ago

@andrewvanbreda , that is absolutely fine. I could do from feature-plant-portal-may-build

andrewvanbreda commented 7 years ago

great. So that will be on dev warehouse and dev plant portal website. Thanks

BirenRathod commented 7 years ago

As long as there are on separate branch, no need to worry.

andrewvanbreda commented 7 years ago

Hi Biren,

Just realised these is a problem with this approach. Can you hold off on this for now until I have time to explain. Will get back to you.

Andy

BirenRathod commented 7 years ago

ok. no problem.

andrewvanbreda commented 7 years ago

Hi Biren, I have checked and the feature-plant-portal-may-build branches do not have the problem I thought they would have so you can update from them. There is a branch for the client_helpers and another with the same name for the warehouse. These need to be placed onto the dev plant portal site and dev warehouse. I am of course assuming that this isn't going to affect anyone else using the dev warehouse?...you might want to check first I suppose

BirenRathod commented 7 years ago

That's ok and I will let you as soon as I done the update.

andrewvanbreda commented 7 years ago

Hi Biren, Just wondering what is the latest situation with this? I am not sure the level of priority of this, David or Oli will know. Perhaps if there is a delay if you could let them know, no urgency from my end

BirenRathod commented 7 years ago

Hello @andrewvanbreda , This has updated on dev warehouse and test plant portal site.

andrewvanbreda commented 7 years ago

Hi Biren,

That is great. I will let David and Oli know that I will be preparing the site

andrewvanbreda commented 7 years ago

Hi Biren,

There seems to be a problem with the Plant Portal site, clicking on the Edit Tab on any form is giving an error. This means I cannot configure the form.

Exception: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"> Not Found

Not Found


HTTP Error 404. The requested resource is not found.

in helper_base::get_read_auth() (line 1405 of D:\web sites\drupal\v7\multisite\sites\test.brc.ac.uk.plantportal\modules\iform\client_helpers\helper_base.php). The website encountered an unexpected error. Please try again later.

BirenRathod commented 7 years ago

Hello @andrewvanbreda

I have sent you a separate email about plantportal last week. you need to create the plantportal website, survey, sample's attributes and occurrence's attributes again.

The reason to do that is I cloned the dev warehouse with live one which I also emailed you.

BirenRathod commented 7 years ago

I have mentioned here https://github.com/BiologicalRecordsCentre/BSBI-Card-and-PlantPortal/issues/55 about to create ID of plantportal site.

andrewvanbreda commented 7 years ago

Hi yes. Sorry my fault. I created the website but then forgot to change the URL to the dev warehouse on the Plant Portal website

andrewvanbreda commented 7 years ago

Hi Biren,

I am not seeing the latest code on the site. Are you sure it was the feature-plant-portal-may-build branches that were used to updated from? The importer.php file should have an importOccurrenceIntoSampleLogic option. Can you check that file contains that word? If it doesn't then something is wrong, I just checked Sourcetree and it looks like that file is ok if the feature-plant-portal-may-build branch is used.

Cheers

BirenRathod commented 7 years ago

@andrewvanbreda , It has upgraded now.

andrewvanbreda commented 7 years ago

Great, will take a look thanks

andrewvanbreda commented 7 years ago

I don't understand what is wrong. It still isn't there the latest code. This is http://test.brc.ac.uk/plantportal/ Could you send me the importer.php file please and I will double check it

BirenRathod commented 7 years ago

Sorry I didn't update that before, I have now.

andrewvanbreda commented 7 years ago

OK thanks no problem. Will take a look

andrewvanbreda commented 7 years ago

Thanks Biren. Looks like the problem I was getting before has been corrected, I can see the options I was after now

andrewvanbreda commented 7 years ago

Hi Biren,

Sorry to be a pain, but am still having issues. I think I know what must be the issue. The whole iForm needs to be updated from that branch not just importer.php My symptoms are that I can now see the options I want on the edit tab so your last update did work, but enabling them does not show the checkboxes I am expecting on the data entry form, this means that import_helper.php is still out of date.

The dev warehouse must also be updated to the feature-plant-portal-may-build branch

andrewvanbreda commented 7 years ago

Hi Biren,

I was just wondering if there was any news on this? Any thoughts?

BirenRathod commented 7 years ago

Hello @andrewvanbreda
the iForm module has been updated from the repository of develop branch.

andrewvanbreda commented 7 years ago

Hi Biren,

I just took another look and as the iForm has been updated from the develop branch the options I am expecting have completely disappeared. This is not surprising, The correct course of action is to update the entire iForm to the feature-plant-portal-may-build branch. Nothing should have come from develop.

Thanks

BirenRathod commented 7 years ago

Hello @andrewvanbreda

I updated the entire iForm module from feature-plant-portal-may-build branch. let me know if any problem.

andrewvanbreda commented 7 years ago

@BirenRathod brilliant, thanks. I will take a look over the weekend.

andrewvanbreda commented 7 years ago

Hi @BirenRathod,

I am pretty sure the drupal end is ok now, but I think the warehouse is not working as I need. Has that been updated from the warehouse branch with the same name?. It is acting as if it hasn't been updated, which is behaving almost correctly but not quite. There is a new option in the importer which allows us to prevent any commits on any import file rows if there are any errors on any of the import rows at all. However the warehouse is still committing the rows, so that suggests it isn't quite up to date

BirenRathod commented 7 years ago

Hello @andyvanbreda

The dev warehouse use the develop branch of the repository. and its version ahead of live warehouse. And I have updated today again with the latest code. I could only see your changes on 24th. If that is what you expect to see than it has upgraded now.

andrewvanbreda commented 7 years ago

Hi Biren,

I would put the changes in the Dev branch, however last time I tried that and got told that I shouldn't do that because the dev branch code should be good enough for the next release. So I do not know what to suggest. Oli and David will need to test it, but it seems we can't update the warehouse code from feature- branches, so I am not sure how we are supposed to test. Any thoughts?

DavidRoy commented 7 years ago

Can you check with Jim, John and Karolis that they are ok with Dev warehouse being updated?

andrewvanbreda commented 7 years ago

@davidroy the other possibility would be to just update the plant portal module on the warehouse. I THINK that would result in a situation where it mostly works, however the importer would always be committing lines to the database, even if it is reporting to the user that the commit hasn't happened because they need to recheck their data. That might be OK (although not idea) to demonstrate it to you. That is a slight guess as I haven't tried the combination of only updating the code on the module.

andrewvanbreda commented 7 years ago

Hi @johnvanbreda @kazlauskis @jimBacon, See the messages above. The situation is I have a new feature branch that affects the warehouse core files (if I remember off the top of my head some of the core files such as ORM are affected). I can't merge into develop as the code isn't ready for that, David and Oli still haven't seen it so it wouldn't be ready for a build release. So the code needs to stay in the feature branch I believe. The main change to the general warehouse files is that an option can now be optioning passed to the code to tell it not to commit the import line after it is validated. Is it OK to get update the dev warehouse updated from my feature branch?...I could merge develop into my feature branch first. Alternatively I suggested to David we only update the Plant Portal Module, but that would mean it is always committing, but it might be OK for demonstration purposes if we know that limitation....although not ideal

johnvanbreda commented 7 years ago

Applying the feature branch (at least temporarily) is OK from my perspective. I agree you should merge develop into the feature branch first.

andrewvanbreda commented 7 years ago

I should add that the new code won't affect the behaviour of the warehouse in the general situation, if the new option isn't passed is will just use existing behaviour. So you won't notice any difference.

kazlauskis commented 7 years ago

I think this is the Biren's & Jim's decision. As long as it doesn't break my stuff, I am OK too with the dev warehouse using feature-branch code.

As a thought, for such reasons like this I think we should be able to launch another warehouse instantly pointing to any branch we need to. Launch a docker container on AWS or somewhere and discard it once it has finished. This way we wouldn't need to have to touch the dev warehouse (or maybe not even need one, if we have the configs to build it locally/remotely ourselves).

andrewvanbreda commented 7 years ago

It won't break your stuff once it is working, the code change is actually very simple, if option is set then don't commit, if missing or not set then commit as usual. Maybe a few lines of code as the option is passed through functions, it was a while back since I worked on it, can't remember exact details. The only way it wouldn't work is if a mistake is made somewhere during the update.

JimBacon commented 7 years ago

Sounds fine to me. If there are no database changes then we can use Git to switch between branches easily. If you output the branch name/commit(?) to the screen instead of the version number that might help others to know what code is in use.

BirenRathod commented 7 years ago

Hello @andyvanbread

Dev warehouse is linked with develop branch, so switching between this two branch is not a problem and John mentioned to create feature branch sounds like a good idea.

andrewvanbreda commented 7 years ago

Hi, @BirenRathod Feature branch exists but I need to merge develop into it.

@JimBacon I wasn't quite sure about your suggestion "If you output the branch name/commit(?) to the screen instead of the version number that might help others to know what code is in use." Is that something you are suggesting Biren needs to do, or is it something you are wanting me to temporarily put into the code. I will need to check about the database, if I remember correctly there wouldn't be any database changes in regards to the general Indicia warehouse, but I will need to check if there are with the Plant Portal importer module...can't remember right now...I don't think so

BirenRathod commented 7 years ago

Once you merge let me know. I think he meant to give proper name to feature branch so you don't need to change the version. you can do it this. By using this feature branch every time when I switch to test your code, it should have latest code from develop branch. Once we finished the test, I will switch back to develop branch.

andrewvanbreda commented 7 years ago

OK, the feature branch is already named correctly I think. Just took a quick look at the code in GitHub and will need to get my head round what is happening. I will let you know once done. I will unassign Karolis, Jim and John now from this issue for now. Will let them know once we are done. I will get back to you Biren.

JimBacon commented 7 years ago

@andrewvanbreda my thought was that if you modified application\views\templates\template.php to show the branch name in the footer then it would remind us what code is running.