Amend form.reps.swag form results

RESOLVED FIXED

Status

()

RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: pierros, Assigned: dkl)

Tracking

Production
x86
Mac OS X

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 years ago
Hello,

The current functionality of the form.reps.swag form is to file a bug against Mozilla Reps product, Swag request component, and fill the description with info from the form. We would like to keep this functionality, but on the same time include in new bugs description the info from the form in a "machine-readable" format so we can have integration with our vendors system. Something like this:

<swagtag>a:15:{s:4:"name";s:17:"Merchandise Mania";s:8:"address1";s:17:"Merchandise House";s:8:"address2";s:13:"6 Elstree Way";s:8:"address3";s:11:"Borehamwood";s:8:"address4";s:13:"Hertfordshire";s:8:"address5";s:7:"WD6 1RN";s:11:"countrycode";s:2:"GB";s:5:"title";s:2:"Mr";s:15:"forenameInitial";s:5:"Simon";s:7:"surname";s:7:"Patnick";s:10:"directLine";s:11:"02087360272";s:6:"mobile";s:13:"07770 080 961";s:3:"fax";s:11:"02087360360";s:5:"email";s:28:"simon@merchandisemania.co.uk";s:13:"addressnumber";s:1:"0";}</swagtag>

.. would be lovely. This will also help us and them in the future in case something changes. Thanks!
can you please provide a specification for the swagtag so we can construct it.  if the specification hasn't been set yet, xml would probably be a much more palatable basis for application interchange.

a better option would be to attach the data as a file to the bug rather than inserting it into the description.
(Reporter)

Comment 2

7 years ago
Hey Byron,

attaching the data in xml format seems indeed as the best option. Please proceed with implementing it. Thanks!
(Assignee)

Updated

7 years ago
Assignee: nobody → dkl
Status: NEW → ASSIGNED
(Assignee)

Comment 3

7 years ago
Created attachment 568789 [details] [diff] [review]
Patch to add xml attachment with swag request information to bug (v1)
Attachment #568789 - Flags: review?(glob)
Component: General → Extensions: REMO
Comment on attachment 568789 [details] [diff] [review]
Patch to add xml attachment with swag request information to bug (v1)

Review of attachment 568789 [details] [diff] [review]:
-----------------------------------------------------------------

this looks excellent, except for the due-date field name.

however i have to r- as it triggers the following warning:
post_bug.cgi: Use of uninitialized value in string eq at ./extensions/TypeSniffer/Extension.pm line 42.

::: extensions/REMO/template/en/default/bug/create/create-remo-swag.xml.tmpl
@@ +47,5 @@
> +                    shiptocountry,
> +                    shiptophone,
> +                    shiptoidrut,
> +                    shipadditional)>
> +<!ELEMENT cf_due_date (#PCDATA)>

"cf_due_date" should be renamed to "shipbeforedate" to match the other fields.
Attachment #568789 - Flags: review?(glob) → review-
(Assignee)

Comment 5

7 years ago
Created attachment 569105 [details] [diff] [review]
Patch to add xml attachment with swag request information to bug (v2)

Thanks for the review. This fixes the Typesniffer warning as well as the shipbeforedate tag name.

dkl
Attachment #568789 - Attachment is obsolete: true
Attachment #569105 - Flags: review?(glob)
Comment on attachment 569105 [details] [diff] [review]
Patch to add xml attachment with swag request information to bug (v2)

r=glob
Attachment #569105 - Flags: review?(glob) → review+
(Assignee)

Comment 7

7 years ago
Thanks for the review. Will be in the next code push sometime this week.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.0
modified extensions/REMO/Extension.pm
added extensions/REMO/template/en/default/bug/create/create-remo-swag.xml.tmpl
modified extensions/TypeSniffer/Extension.pm
Committed revision 7907. 

dkl
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
this change triggers a 'Use of uninitialized value in string eq' warning when cloning a bug, which i've fixed:

Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.0/
modified extensions/REMO/Extension.pm
Committed revision 7911.
You need to log in before you can comment on or make changes to this bug.