Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

User property picker on customer portal

Attila Győri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 26, 2020

Hi all!

I would like to manage issues reported by residents of apartment houses. (for example: broken window, faulty lights, etc.)

Customers has user properties:
Address : The house
Apartment : Door number

These properties are copied by Jira Workflow Toolbox automation to a custom field for reported issues so I can see them on Issue details screen.

Some of them has more than one apartment, so I want to let them choose which apartment is the issue about. I would like the Apartment property of the logged in user to show in a selector field.

Is there any way to achieve this?

Jira Workflow Toolbox has no custom selector field for this as I can tell.

Thanks!
Bálint

7 answers

1 vote
Fidel Castro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2020

Hi @Attila Győri ,

I can give a solution like this one:

  1. A calculated text field called My Apartments will display a numbered list of the apartments of the owner, something like this:user_property_picker.png
  2. Field My Apartments is only a text field. In order to select the apartments we will use a Select List (single select) custom field called Selected Apartment with numeric options 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. We will consider that the maximum of apartments for an owner is 10. The owner will select the apartment number in this select list.

We will implement also:

  • A validator that will prevent the user from selecting a number higher than the number of apartments he has, i.e., in the example above he will not be able to select 4.
  • We will implement a post-function that will automatically set a text custom field called Affected Apartment with the address of the apartment selected by the user in the numeric select list.

If the proposed solution is Ok for you, please explain the format that takes user properties Address and Apartment when they contain more than than one apartment, and I can give you the expressions for calculated text field My Apartment, for the validator and for the post-function that will set field Affected Apartment.

Regards,

1 vote
Fidel Castro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2020

Hi @Attila Győri ,

I can give a solution like this one:

  1. A calculated text field called My Apartments will display a numbered list of the apartments of the owner, something like this:user_property_picker.png
  2. Field My Apartments is only a text field. In order to select the apartments we will use a Select List (single select) custom field called Selected Apartment with numeric options 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. We will consider that the maximum of apartments for an owner is 10. The owner will select the apartment number in this select list.

We will implement also:

  • A validator that will prevent the user from selecting a number higher than the number of apartments he has, i.e., in the example above he will not be able to select 4.
  • We will implement a post-function that will automatically set a text custom field called Affected Apartment with the address of the apartment selected by the user in the numeric select list.

If the proposed solution is Ok for you, please explain the format that takes user properties Address and Apartment when they contain more than than one apartment, and I can give you the expressions for calculated text field My Apartment, for the validator and for the post-function that will set field Affected Apartment.

Regards,

Fidel

0 votes
Fidel Castro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2020

Hi @Attila Győri

I will assume that all the user properties contains a number, i.e., we have Cim 1, Cim 2, Cim 3, Lakas 1, Lakas 2 and Lakas3. Please, let me know if this assumption is not possible. We can also have Cim, and Lakas instead of Cim 1 and Lakas 1, but this will complicate things unnecessarily.

The configuration of Calculated Text Field "My Apartments" is this one:

jwt_ac_my_apartments.png

Expression in advanced parsing mode is:

toString(textOnStringList(["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], userProperty("Cim " + ^%, %{00006}) != "" ? (^% + ") " + userProperty("Lakas " + ^%, %{00006}) + ", " + userProperty("Cim " + ^%, %{00006})) : null), "<br>")

Here I'm assuming that issue reporter contains the properties.

 

The boolean validator for checking the selection in field "Selected Apartment" is this one:

jwt_ac_validator.png

The boolean expression is this one:

%{nnnnn} != null AND %{nnnnn} in textOnStringList(["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], userProperty("Cim " + ^%, %{00006}) != "" ? ^% : null)

replacing nnnnn with field code for Selected Apartment single select list custom field.

The Update issue fields post-function for setting Affected Apartment  single line text custom field is this one:

jwt_ac_postfunction.png

The advanced parsed text expression is this one:

userProperty("Lakas " + %{nnnnn}, %{00006}) + ", " + userProperty("Cim " + %{nnnnn}, %{00006})

replacing nnnnn with field code for Selected Apartment single select list custom field. 

This solution considers that maximum of apartments per user is 10, but you can easily extend it.

Please, let me know if you have any doubt.

Regards,

Fidel

0 votes
Attila Győri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 29, 2020

Hi @Fidel Castro


Thank you your reply!

If customer has one apartment it looks like this:
Key: Cim
Value: 110 Irving St NW, Washington

Key: Lakas
Value: 2nd door

For the additional apartments:
Key: Cim 2
Value: 2375 Pennsylvania Ave Nw, Washington

Key: Lakas 2
Value: 5th door

Key: Cim 3
Value: 3300 Gallows Rd, Falls Church

Key: Lakas 3
Value: 4th door

 

Btw it's hungarian, Lakas means apartment and Cim means address.

0 votes
Fidel Castro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2020

Hi @Attila Győri ,

I can give a solution like this one:

  1. A calculated text field called My Apartments will display a numbered list of the apartments of the owner, something like this:
  2. Field My Apartments is only a text field. In order to select the apartments we will use a Select List (single select) custom field called Selected Apartment with numeric options 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. We will consider that the maximum of apartments for an owner is 10. The owner will select the apartment number in this select list.

We will implement also:

  • A validator that will prevent the user from selecting a number higher than the number of apartments he has, i.e., in the example above he will not be able to select 4.
  • We will implement a post-function that will automatically set a text custom field called Affected Apartment with the address of the apartment selected by the user in the numeric select list.

If the proposed solution is Ok for you, please explain the format that takes user properties Address and Apartment when they contain more than than one apartment, and I can give you the expressions for calculated text field My Apartment, for the validator and for the post-function that will set field Affected Apartment.

Regards,

Fidel

0 votes
Fidel Castro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2020

Hi @Attila Győri ,

I can give a solution like this one:

  1. A calculated text field called My Apartments will display a numbered list of the apartments of the owner, something like this:user_property_picker.png
  2. Field My Apartments is only a text field. In order to select the apartments we will use a Select List (single select) custom field called Selected Apartment with numeric options 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. We will consider that the maximum of apartments for an owner is 10. The owner will select the apartment number in this select list.

We will implement also:

  • A validator that will prevent the user from selecting a number higher than the number of apartments he has, i.e., in the example above he will not be able to select 4.
  • We will implement a post-function that will automatically set a text custom field called Affected Apartment with the address of the apartment selected by the user in the numeric select list.

If the proposed solution is Ok for you, please explain the format that takes user properties Address and Apartment when they contain more than than one apartment, and I can give you the expressions for calculated text field My Apartment, for the validator and for the post-function that will set field Affected Apartment.

Regards,

Fidel

0 votes
Fidel Castro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2020

Hi @Attila Győri ,

I can give a solution like this one:

  1. A calculated text field called My Apartments will display a numbered list of the apartments of the owner, something like this:user_property_picker.png
  2. Field My Apartments is only a text field. In order to select the apartments we will use a Select List (single select) custom field called Selected Apartment with numeric options 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. We will consider that the maximum of apartments for an owner is 10. The owner will select the apartment number in this select list.

We will implement also:

  • A validator that will prevent the user from selecting a number higher than the number of apartments he has, i.e., in the example above he will not be able to select 4.
  • We will implement a post-function that will automatically set a text custom field called Affected Apartment with the address of the apartment selected by the user in the numeric select list.

If the proposed solution is Ok for you, please explain the format that takes user properties Address and Apartment when they contain more than than one apartment, and I can give you the expressions for calculated text field My Apartment, for the validator and for the post-function that will set field Affected Apartment.

Regards,

Fidel

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
4.8.0
TAGS
AUG Leaders

Atlassian Community Events