Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The functionality to search for fields of the user profile is available out of the box after the installation of the User Profile Plugin. You only have to type the name of the field and the search entry as shown in illustration 1 in the search input field of Confluence.

Image Added

The disadvantage of this procedure is that the user has to know the designation of the field. A form is more comfortable for the users. With Adaptavist´s Advanced Search Plugin you are able to create a form.

...

Imagine that the profile has the fields "team", "department", "skills", "city" and "phone". If you want a form for searching these fields copy the following code and paste it on a Wiki page for the advanced user search.

Code Block
h2.User search 
{search-form} 
| Team: | {search-input:type=text|match=metadata|metadataKey=Team} |

|Department: | {search-input:type=text|match=metadata|metadataKey=Department} |

|Skills: | {search-input:type=text|match=metadata|metadataKey=Skills} |

|City: | {search-input:type=text|match=metadata|metadataKey=City} |

|Phone: | {search-input:type=text|match=metadata|metadataKey=Phone} |

{search-submit:submit search}

{search-form} 
{search-results}

The macro {search-form} defines the search form. You have to assign the value "metadata" to the parameter "match" and the name of the field to the parameter "metadataKey" in the macro {search-input}. The value of the parameter metadataKey defines which field of the user profile you´re looking for.

...