קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
תוויות, שדות ואפשרויות עוברים מצבים ספציפיים במהלך החיים שלהם.
בנוסף, יכול להיות שלתוויות יהיו גרסאות שונות. בתרשים הבא מוצג מחזור החיים של התווית, כולל ניהול גרסאות:
איור 3. מחזור החיים של תווית
יצירת תווית (create()) – התווית נוצרת ונשמרת במסד נתונים בתור revision_id=1. התווית במצב UNPUBLISHED_DRAFT.
במצב הזה:
המשתמשים לא יכולים לראות את התווית
המשתמשים לא יכולים להחיל את התווית על פריטים ב-Drive.
(אופציונלי) מעדכנים תווית, שדה או בחירה (delta()) – כל עדכון, גם לפני שהוא מתפרסם, נשמר במסד נתונים, והמספר של הגרסה של התווית גדל.
פרסום תווית (publish()) – התווית במצב PUBLISHED והמשתמשים יכולים להחיל את התווית. פרסום התווית מגדיל את מספר הגרסה שלה.
(אופציונלי) עדכון תווית, שדה או בחירה (delta()) – התווית, השדה או הבחירה מתעדכנים ונשמרים במסד נתונים כתווית טיוטה. התווית כוללת את המצב PUBLISHED עם hasUnpublishedChanges=true, כלומר יש שינויים בטיוטה, אבל הם לא זמינים למשתמשים. כל עדכון מגדיל את מספר הגרסה של התווית.
(אופציונלי) פרסום תווית (publish()) – אם יש טיוטה, היא תפורסם. התווית במצב PUBLISHED והמשתמשים יכולים להחיל אותה. כשמפרסמים את התווית, הגרסה שלה מתעדכנת.
השבתת תווית (disable()) – התווית במצב DISABLED, אבל המשתמשים יכולים להוסיף את התווית דרך ה-API. עם זאת, תווית מושבתת לא מוצגת בממשק משתמש אלא אם היא מוגדרת להצגה. הוצאה משימוש של התווית
מגדילה את מספר הגרסה שלה.
הפעלת תווית (enable()) – התווית חוזרת למצב PUBLISHED והמשתמשים יכולים להחיל אותה. פרסום התווית מגדיל את מספר הגרסה שלה.
מחיקת תווית (delete()) – התווית במצב DELETED ואי אפשר להחיל אותה. תוויות שנמחקו נמחקות באופן סופי.
חשוב להדגיש שכל עדכון של תווית מגדיל את מספר הגרסה של התווית. בנוסף, אם התווית כבר פורסמה, פרסום חוזר שלה אחרי n עדכונים פירושו שמספר הגרסה שפורסמה הוא גרסה + n + 1 מספר העדכונים הרצופים.
[null,null,["עדכון אחרון: 2025-08-29 (שעון UTC)."],[],[],null,["# Label lifecycle\n\nLabels, fields, and choices go through specific states throughout their lives.\nAdditionally, labels might have different revisions. The following diagram shows\nthe label lifecycle, including revisioning:\n**Figure 3.** Lifecycle of a label\n\n1. **Create a label (`create()`)** ---The label is created and stored in a database as `revision_id=1`. The label has the state of `UNPUBLISHED_DRAFT`. In this state:\n - Users can't view the label\n - Users can't apply the label to Drive items.\n2. **(optional) Update a label, field, or choice (`delta()`)**--- Every update, even before it's published, is stored in a database, and the label's revision is incremented.\n3. **Publish a label (`publish()`)** ---The label has the state of `PUBLISHED` and users can apply the label. Publishing the label increments its revision.\n4. **(optional) Update a label, field, or choice (`delta()`)** --- The label, field, or choice is updated and stored in a database as a draft label. The label has the state of `PUBLISHED` with `hasUnpublishedChanges=true` meaning there are draft changes, but they aren't available to users. Each update increments the label's revision.\n5. **(optional) Publish a label (`publish()`)** ---If available, the most-current draft is published. The label has the state of `PUBLISHED` and users can apply the label. Publishing the label increments its version.\n6. **Disable a label (`disable()`)** ---The label has the state of `DISABLED` though users can apply the label through the API. However, a disabled label isn't shown in a UI unless configured to be shown. Deprecating the label increments its revision.\n7. **Enable a label (`enable()`)** ---The label is returned to a `PUBLISHED` state and users can apply the label. Publishing the label increments its revision.\n8. **Delete a label (`delete()`)** ---The label has a state of `DELETED` and can't be applied. Deleted labels are eventually purged.\n\nIt's important to emphasize that every update to a label increments the label's\nrevision. And, if the label has already been published, publishing it again\nafter *n* updates means that its published revision number is revision + *n* + 1\nnumber of successive updates."]]