How can we syncronize HP ALM system fields to Jira custom fields

Originally asked by Peter Meier on 22 June 2022 (original question)


Hi,

we want to sync a jira system field with an hp alm custom field and an hp alm system field with a jira custom field.

Hp alm system field has different values ​​with the jira custom field, so mapping for the values ​​is also necessary.

We tried like this:

Jira:
Icoming:
def ReproDefectMap = [“Y”: “Yes”, “N”: “No”] // [“remote options” : “local option”]
def remoteRepro = replica.reproducible.name
issue.customFields.“CF”.value = ReproDefectMap [remoteRepro] ?: remoteRepro

outgoing:
replica.customFields.“CF”.value = issue.components.name

Hp Alm:
Incoming:
defect.customFields.“CF”.value = replica.customFields.“CF”?.value

outgoing:
replica.reproducible = defect.reproducible


Answer by Jose Pablo Alpizar Hidalgo on 27 July 2022

Hello Peter Meier,
Notice that in order to synchronize a jira SYSTEM FIELD with an hp alm CUSTOM FIELD and an hp alm SYSTEM FIELD with a jira CUSTOM FIELD, please check the below article:
https://docs.idalko.com/exalate/x/KY0rAQ
you can also review the next link for the fields and entities available for synchronization:
https://docs.idalko.com/exalate/x/igLuAg
As well, feel free to implement as the next example:

Jira:

Incoming:
issue.customFields."CF text”.value = replica.summary

Outgoing:
replica.summary = issue.summary

HP ALM:

Incoming:
defect.customFields."BG_USER".value = replica.summary

Outgoing:
replica.summary = defect.summary

And an alternative if you require a more immediate solution is to use one of our partners who will be able to assist with configuration queries and use cases on demand. This will depend on your budget and the urgency of your configuration.


Comments:

Peter Meier commented on 13 September 2022

The solution didn’t work:
HP ALM:
Outgoing:
replica.reproducable= defect.reproducible

Jira:
Incoming:
issue.customFields.“Reproduzierbar”.value = replica.reproducible

We got the following error message in HP ALM:

error.csv (old community)

Answer by Support on 01 July 2022

You have been trying this:

Jira:
Incoming:

def ReproDefectMap = ["Y": "Yes", "N": "No"] // ["remote options" : "local option"] 
def remoteRepro = [replica.reproducible.name|http://replica.reproducible.name/]
issue.customFields."CF".value     = ReproDefectMap [remoteRepro] ?: remoteRepro

outgoing:

replica.customFields."CF".value  = [issue.components.name|http://issue.components.name/]

Hp Alm:
Incoming:

defect.customFields."CF".value = replica.customFields."CF"?.value

Outgoing:

replica.reproducible    = defect.reproducible\

Please try to apply the following:

Jira:
Incoming:

issue.customFields."CF".value = replica.customFields."BG_USER"?.value?.collect { opt -> opt?.value } 

Outgoing:

replica.customFields."CF" = issue.customFields."CF"

Hp Alm:
Incoming:

//i.e. add value from the jira custom field into the defect custom field with name BG_USER
defect.customFields."BG_USER".value = replica.customFields."CF".value

Outgoing:

replica.customFields."CF".value = defect.customFields."CF".value

Also, reference the below article:
https://docs.idalko.com/exalate/x/KY0rAQ
https://docs.idalko.com/exalate/x/igLuAg


Comments:

Peter Meier commented on 14 July 2022

Thanks for your answer. :slight_smile:

I think i was misunderstood. We need a solution for synchronizing a jira SYSTEM FIELD with an hp alm CUSTOM FIELD and an hp alm SYSTEM FIELD with a jira CUSTOM FIELD.


You can see that on my first try.

-jira SYSTEM FIELD (multiple-selection list) → hp alm CUSTOM FIELD (multiple-selection list)


-hp alm SYSTEM FIELD → jira CUSTOM FIELD (with different values)



The solution is for synchronization between custom fields.


Or am I misunderstanding something?


Ariel Aguilar commented on 14 July 2022

Hi Peter,

When you say “Jira System Field” isn’t this a custom field? If not, what field for example you are referring to?

Kind regards,

Ariel

Peter Meier commented on 15 July 2022

For example status, components, summary, description.

Answer by Support on 22 June 2022

Please review the following article to check information to set the outgoing script:

https://docs.idalko.com/exalate/x/AYBMBw


Comments:

Peter Meier commented on 27 June 2022

Unfortunately the answer doesn’t help me.
In addition, the fields “replica.customFields.“CF”.value = issue.components.name” are multiple-selection list.