# Add a new field from two field one is long type other is string type

**URL:** <https://discuss.elastic.co/t/add-a-new-field-from-two-field-one-is-long-type-other-is-string-type/65880>\
**Category:** Logstash\
**Created:** [November 12, 2016, 3:13pm UTC](https://discuss.elastic.co/t/add-a-new-field-from-two-field-one-is-long-type-other-is-string-type/65880 "2016-11-12T15:13:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![manish\_jindal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manish_jindal/32/13134_2.png) [@manish\_jindal](https://discuss.elastic.co/u/manish_jindal)\
**Post date:** [November 12, 2016, 3:13pm UTC](https://discuss.elastic.co/t/add-a-new-field-from-two-field-one-is-long-type-other-is-string-type/65880/1 "2016-11-12T15:13:48Z")

</div>

Hi,

I am trying to join two field fetched from database, one is long type and other is string type .

I am using following filter.

filter {  
mutate {  
add\_field =\> { "IssueLink" =\> "%{project\_key}-%{issue\_num}" }  
}  
}

"project\_key":"DOCS"  
"issue\_num":667

"IssueLink":"DOCS-0.667E3"

Expected output - "DOCS-667"

why the output is not expected ? What's the problem here ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 13, 2016, 7:49am UTC](https://discuss.elastic.co/t/add-a-new-field-from-two-field-one-is-long-type-other-is-string-type/65880/2 "2016-11-13T07:49:56Z")

</div>

It's not clear what is the input and what is the actual output.  
Can you please clear up your post?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 11, 2016, 7:50am UTC](https://discuss.elastic.co/t/add-a-new-field-from-two-field-one-is-long-type-other-is-string-type/65880/3 "2016-12-11T07:50:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
