> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/configuration-client/site-management/reports/creating-a-new-report/time-and-attendance-report/flexible-shift-pattern-rules.md).

# Flexible Shift Pattern rules

When the Ignore Shift Patterns option is selected on the 'Shift Pattern Options' page of the Time and Attendance Report wizard, the following rules apply:

**Usable Events**

1. The following describes events that will be used to create Attendance Records.

   * An Entry Event will only be used if its subsequent event is an Exit Event, or if it has no subsequent event within the Report Time-Frame.

   An Entry Event will NOT be used if its subsequent event is also an Entry Event.

   * An Exit Event will only be used if its preceding event is an Entry Event, or if it has no preceding event within the Report Time-Frame.

   An Exit Event will NOT be used if its preceding event is also an Exit Event.

   * The usability of an event is subject to the resulting Attendance Record being valid. See “Valid Attendance Records” below.

   **Creating normal Attendance Records**
2. A normal Attendance Record is created by finding the first unused Usable Entry Event for a Cardholder and matching it with the next Usable Exit Event to determine the total contiguous In-Zone Time for the Cardholder. See “Usable Events” for the definition of Usable Entry and Exit Events.

   **Creating Attendance Records using assumptions**
3. If the Cardholder’s First Event is an Exit Event, then assume the Cardholder was In-Zone at the Report Start Date-Time and create an Attendance Record to reflect this. Use the Report Start Date-Time as the Entry Time. NB: The resulting Attendance Record will be subject to the “Valid Attendance Records” rule (see below).
4. If the Cardholder’s Final Event is an Entry Event, then assume the Cardholder was In-Zone at the Report End Date-Time and create an Attendance Record to reflect this. Use the Report End Date-Time as the Exit Time. NB: The resulting Attendance Record will be subject to the “Valid Attendance Records” rule (see below).

   **Valid Attendance Records**
5. Any Attendance Record whose Attendance Time is greater than the Maximum In-Zone Time is considered invalid. Both the Entry Event and the Exit Event for that record must be classed as unusable and reported accordingly.
6. Day Boundaries are not a consideration for Flexible Shift Pattern rules. Attendance Records that span across a Day Boundary are considered valid.

   **Creating Summary Attendance Records**
7. A Summary Attendance Record is created by combining all valid Attendance Records (for a particular Cardholder) that have the same Entry Date, regardless of the Attendance Record’s End Date-Time.
8. A Summary Attendance Record is given a Entry Date-Time equal to the Entry Date-Time of the first Attendance Record in the summarised group, and an End Date-Time equal to the End Date-Time of the last Attendance Record in the summarised group.
9. The Summary Attendance Record has a Total Worked Time equal to the sum of Time Worked for all Attendance Records in the summarised group (any time the Cardholder was absent in-between the Summary Attendance Record’s Entry Date-Time and End Date-Time is not included).

   **Valid Summary Attendance Records**
10. All calculated Summary Attendance Records are considered valid regardless of their length.
11. If any unusable events occur in-between the Summary Attendance Record’s Entry Date-Time and End Date-Time, the unusable events are ignored and this does not invalidate the Summary Attendance Record.
12. The Maximum In-Zone Time setting is not a consideration when creating Summary Attendance Records. The Total Worked Time of a Summary Attendance Record can exceed the Maximum In-Zone Time setting but none of the individual Attendance Records in the summarised group will.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/configuration-client/site-management/reports/creating-a-new-report/time-and-attendance-report/flexible-shift-pattern-rules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
