Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom fields - Person, Groups and GroupMembers #147

Closed
3 tasks done
DumbergerL opened this issue May 30, 2023 · 2 comments · Fixed by #148
Closed
3 tasks done

Custom fields - Person, Groups and GroupMembers #147

DumbergerL opened this issue May 30, 2023 · 2 comments · Fixed by #148

Comments

@DumbergerL
Copy link
Contributor

DumbergerL commented May 30, 2023

Suggestion from forum: https://forum.church.tools/topic/9358/churchtools-api-client-php/5?_=1685434052136

TODO:

  • Wrap GroupMemberFields-API 7fe4e67
  • Wrap DBFields-AP
  • Display DB-Field Values (e.q. GroupInformation, Persons... ...)
@DumbergerL
Copy link
Contributor Author

DumbergerL commented May 30, 2023

Custom fields in Group-Members:

Example data:
Group-Custom Fields

Retrieve Member-Fields configuration via /api/groups/9/memberfields:

[
    {
        "type": "person",
        "field": {
            "id": 3,
            "groupId": 9,
            "dbField": {
                "id": 54,
                "key": "nickname",
                "name": "nickname",
                "nameTranslated": "Spitzname",
                "column": "spitzname",
                "shorty": "",
                "fieldCategoryCode": "f_address",
                "fieldTypeCode": "text",
                "fieldTypeId": 1,
                "isActive": "1",
                "isNewPersonField": false,
                "lineEnding": "(%) ",
                "secLevel": 1,
                "length": 30,
                "sortKey": 3,
                "deleteOnArchive": false,
                "nullable": false,
                "hideInFrontend": false,
                "isBasicInfo": "0",
                "options": []
            },
            "sortKey": 0,
            "requiredInRegistrationForm": false
        }
    },
    {
        "type": "group",
        "field": {
            "id": 3,
            "groupId": 9,
            "fieldName": "vocal range",
            "note": "vocal range of person from key to key",
            "sortKey": 1,
            "fieldTypeId": 1,
            "fieldTypeCode": "text",
            "securityLevel": 1,
            "defaultValue": "",
            "options": [],
            "useInRegistrationForm": false,
            "requiredInRegistrationForm": false
        }
    }
]

Data:

  • GroupMember - Model contains Attributes "fields" and "personFields"

@DumbergerL
Copy link
Contributor Author

Custom fields in Groups

Create custom field

  1. Stammdaten
  2. DB-Felder
  3. Create field with "DB-Feld-Typ" = Gruppe
  4. Example identifier: 5pm_name

Retrieve custom group fields:

  • retrieve with /api/groups/9
  • in path "information.5pm_name"

@DumbergerL DumbergerL linked a pull request Jun 1, 2023 that will close this issue
DumbergerL added a commit that referenced this issue Jun 13, 2023
feat(group-member-fields): add GroupMemberFields-API #147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant