Voting is one simple yet very powerful uses of
Trackers in Tiki. This profile will enable the tracker feature and create a basic wiki page to act as a custom reduced interface to vote in the system, while hiding some fields to the end user, that are needed to ensure that the user is recognized as a member of the only group that can vote, and that only one vote per user is allowed.
This page will be created:
Profile_Vote_voting_page
YAML
preferences:
feature_trackers: y
trackerfield_autoincrement: y
trackerfield_dropdownother: y
wikiplugin_jq: y
instructions: Profile_Vote_voting_page
objects:
-
type: tracker
ref: Vote
data:
name: Voting
description: >
Voting for the New Board according to the proposal shown in the minutes from last general meeting.
sort_default_order: desc
restrict_end: 0
restrict_start: 0
allow:
- one_item_per_user
show:
- list_creation_date
- creation_date
- status_admin_only
-
type: tracker_field
ref: voting_notaSobreLaVotaciN
data:
name: Note from the Voting System
permname: notaSobreLaVotaciN
tracker: $profileobject:Vote$
options:
wikiparse: 1
max: 100
type: static
order: 0
visible: admin_only
description: |
^Choose the pre-selected, as proposed in the last General Meeting, or type in the full name of your personal proposal, at the "__Other__" box for the appropriate role. ~~red:Keep i mind that by writing something in the "__Other__" field, the different choice placed in the drop-down will be overridden. Moreover, if you choose "__Other__" in the drop-down, but you leave the box blank, that vote will be counted as "__Null Vote__", just as if you wrote the name and surname of someone who does not appear in the Members List~~. %%% %%%Please note that you can choose the option "__Blank vote__" or "__Null vote__", if you prefer, directly through from the drop-down itself. %%% %%%If you made a mistake and you want to correct your vote, all you have to do is to vote again, your old vote and will be replaced by your new choice.^
descparsed: y
flags:
- public
-
type: tracker_field
ref: voting_presidente
data:
name: Presidency
permname: presidente
tracker: $profileobject:Vote$
options:
options:
- Mrs Mary Jones
- Mrs Mary Jones
- Blank vote
- Null vote
- Other
type: dropdown_other
order: 10
flags:
- searchable
- public
- mandatory
-
type: tracker_field
ref: voting_vicepresidente
data:
name: Vicepresidency
permname: vicepresidente
tracker: $profileobject:Vote$
options:
options:
- Armando Bronca PhD.
- Armando Bronca PhD.
- Blank vote
- Null vote
- Other
type: dropdown_other
order: 20
flags:
- searchable
- public
- mandatory
-
type: tracker_field
ref: voting_secretariado
data:
name: Secretarial
permname: secretariado
tracker: $profileobject:Vote$
options:
options:
- Mr John Smith
- Mr John Smith
- Blank vote
- Null vote
- Other
type: dropdown_other
order: 30
flags:
- searchable
- public
- mandatory
-
type: tracker_field
ref: voting_tesorerA
data:
name: Treasury
permname: tesorerA
tracker: $profileobject:Vote$
options:
options:
- Robin Hood Jr.
- Robin Hood Jr.
- Blank vote
- Null vote
- Other
type: dropdown_other
order: 40
flags:
- searchable
- public
- mandatory
-
type: tracker_field
ref: voting_vocalA_1
data:
name: Extra Membership 1
permname: vocalA_1
tracker: $profileobject:Vote$
options:
options:
- John Doe Sr.
- John Doe Sr.
- Blank vote
- Null vote
- Other
type: dropdown_other
order: 50
flags:
- searchable
- public
- mandatory
-
type: tracker_field
ref: voting_vocalA_2
data:
name: Extra Membership 2
permname: vocalA_2
tracker: $profileobject:Vote$
options:
options:
- Lara Croft
- Lara Croft
- Blank vote
- Null vote
- Other
type: dropdown_other
order: 60
flags:
- searchable
- public
- mandatory
-
type: tracker_field
ref: voting_vocalA_3
data:
name: Extra Membership 3
permname: vocalA_3
tracker: $profileobject:Vote$
options:
options:
- Perico Los Palotes
- Perico Los Palotes
- Blank vote
- Null vote
- Other
type: dropdown_other
order: 70
flags:
- searchable
- public
- mandatory
-
type: tracker_field
ref: voting_vocalA_4
data:
name: Extra Membership 4
permname: vocalA_4
tracker: $profileobject:Vote$
options:
options:
- Aytor Tilladepa Tatas
- Aytor Tilladepa Tatas
- Blank vote
- Null vote
- Other
type: dropdown_other
order: 80
flags:
- searchable
- public
- mandatory
-
type: tracker_field
ref: voting_usuario
data:
name: Username
permname: usuario
tracker: $profileobject:Vote$
options:
autoassign: 1
notify: 1
type: user
order: 90
visible: admin_only
description: >
~~grey:''This field is necessary to check that the user is a member, and restrict the system to one vote per person in the members group. This field is only visible by the person voting at the time of the vote, and the system administrator to ensure that the system worked properly and there is a single vote per person, at any time if doubts arise about the voting system. No other member of the organization will have access to view voters. Also, once the voting period is over, and no computer issues were detected, then this user field will be deleted by the system administrator, so that the vote record will be completely anonymous regarding who voted what.''~~
descparsed: y
flags:
- link
- mandatory
-
type: tracker_field
ref: voting_voto
data:
name: 'Vote #'
permname: voto
tracker: $profileobject:Vote$
options:
start: 1
prepend: '#'
type: auto_increment
order: 100
flags:
- searchable
- public
-
type: tracker_option
ref: voting_sort_default_field
data:
tracker: $profileobject:Vote$
name: sort_default_field
value: creation
Sample data
YAML
This will include:
Profile_Vote_voting_page
YAML
preferences:
enable: [ feature_wiki ]
objects:
-
type: wiki_page
ref: voting_page
data:
name: Voting
description: The Voting System
lang: en
content: wikicontent:Profile_Vote_voting_page