Jump to content

Automatic calculation of field value


Naz
 Share

Recommended Posts

I'm working on a page set up by someone else, someone who isn't part of the project anymore. Recently some data inconsistencies have appeared in one field, and I'm trying to find out what causes them. Problem is: I have no idea how the field is populated with data. So maybe some of the clever and helpful people in this forum can give me a pointer where to look.

I have a template called "book" whose grandchild is at least one page with the template "date". Each date has a field "start" and a field "end". Several dates can be associated with one book, which is why the template "book" has the fields "earliest date" and "latest date" to identify the whole date range associated with one book. The values of "earliest date" and "latest date" are automatically populated with respectively the earliest "start" and the latest "end" field of all its grandchildren.

I tried figuring out where this happens and I have no clue at all. It doesn't happen in the "book" template, nor anywhere in the code (as far as I can see - I looked at all uses of the field names and only saw its value printed out, but not set anywhere). I can't see any setting in the admin that would cause this relationship between the fields. Nor did I find a module that causes it. The FieldType of all fields involved is "integer". Does anyone have an idea where I could start looking?

Link to comment
Share on other sites

@Zeka Thanks! For some reason my IDE hadn't downloaded the standalone module files in the modules folder, but only its subfolders. A thorough search for the files you listed led me to the custom module responsible for creating the field data. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...