MantisBT

View Issue Details Jump to Notes ] Wiki ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009936mantisbtapi soappublic2008-12-04 09:202014-02-07 18:24
Reporterlaurentb 
Assigned Torombert 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformAllOSAllOS Version
Product Version1.1.2 
Target Version1.2.16Fixed in Version1.2.16 
Summary0009936: add history information
DescriptionHi,

I've been using Mantisconnect for some project.
For this particular project, i needed to get history information in
addition of current available issue information.

So i had to develop this feature of php webservice based on latest version
of
mantisconnect/trunk/webservice/mc

services concernes are :

mc_issue_get
mc_project_get_issues
mc_filter_get_issues

Now that is done and it works fine to me, and in view of the fact that
this feature could be useful for users, i was wondering if it could
integrated in a next version.

Anyway, here is the archive of code modifications in attached file.

Because it has been not modified, the archive doesn't contains "nusoap"
directory.

Tagspatch
Attached Fileszip file icon mc.zip [^] (38,692 bytes) 2008-12-04 09:20
patch file icon ticket_0009936.patch [^] (5,235 bytes) 2012-06-07 20:32 [Show Content]
patch file icon mantis_history_SOAP.patch [^] (5,251 bytes) 2012-12-03 08:00 [Show Content]

- Relationships
has duplicate 0014833closed mantisbt MantisConnect - Possibility to add Histories in IssueData 
related to 0014943confirmed Mylyn Connector Make history available in Mylyn 

-  Notes
User avatar (0030562)
vboctor (administrator)
2011-12-13 02:31

It would be great if you can provide a patch against 1.2.8 release / latest code in master-1.2.x branch. If you are a user of github, then sending a pull request for your change will even be better.
User avatar (0032043)
wmatusiak (reporter)
2012-06-07 20:33
edited on: 2012-06-07 20:41

Hello
Code in zip is based on very old version ;(
I diff it with 3ed7f3c, with is first soap api version, and then reapply over 1.2.x.
Add some code format tweak and resolve code incompatibilities.
I attached formated patch.

This should also work with 1.3 but not test it.

User avatar (0032056)
vboctor (administrator)
2012-06-09 23:20

I had a quick look, here are some comments:

1. The history array should contain old value and new value, rather than change.

2. For user, we may want to use mci_account_get_array_by_id() to be consistent with other places where we reference a user.

3. The entry name in the array should not be "histories", maybe "history", "history_entries", "audit_log". I prefer the "audit_log" or "history".

4. There are no unit tests.

5. I wonder if we should be localizing the entries or not. We should check other areas.

6. You seem to have two methods that retrieve the history + transform it. Maybe they should be combined into one method.
User avatar (0032057)
vboctor (administrator)
2012-06-09 23:21

btw, thanks for the contribution.
User avatar (0032058)
rombert (developer)
2012-06-10 06:04

This looks good overall, thanks.

I have one design comment - we should move this history information to a different soap call. Adding it to the existing one can greatly increase the data transfer required when querying for issues , which I think is not what we want.

I suggest that we make a separate API call: mc_issue_get_history ( username, password, issue_id ) or whatever fits your use case.

A nitpick - you're calling config_get( 'normal_date_format' ) but not using it at all.
User avatar (0032064)
wmatusiak (reporter)
2012-06-10 16:08

I only get code from zip and reapply it on never version.
I not change anything from original code provided by laurentb.
Your comments looks good.

I think I'd find some time to implement it and provide better patch ;)
User avatar (0032066)
rombert (developer)
2012-06-11 06:24

(In reply to comment 0009936:0032064)
> I think I'd find some time to implement it and provide better patch ;)

That would be great! If you need help in development please ask in this ticket or subscribe to https://lists.sourceforge.net/lists/listinfo/mantisbt-soap-dev [^] - whichever feels most comfortable to you.
User avatar (0034450)
winston (reporter)
2012-12-03 08:03
edited on: 2012-12-03 08:04

Hi

I was looking for the same functionality. Please have a look at the attached patch (mantis_history_SOAP.patch) based on the "latest code in master-1.2.x branch" (commit id: deb45ecd7701e77439f7c10806f1a15c728def8a). It creates a new API function called mc_issue_get_history( username, password, issue_id ).

User avatar (0034546)
rombert (developer)
2012-12-15 19:02

(In reply to comment 0009936:0034450)
> Hi
>
> I was looking for the same functionality. Please have a look at the attached
> patch (mantis_history_SOAP.patch) based on the "latest code in master-1.2.x
> branch" (commit id: deb45ecd7701e77439f7c10806f1a15c728def8a). It creates a new
> API function called mc_issue_get_history( username, password, issue_id ).

Hi and thanks for the patch! I'd like to include this in the next release.

I have a couple of comments

  1. the security checks should include the 'view_history_threshold', see the email_build_visible_bug_data from email_api.php
  2. Could you submit this as a pull request on github, as it makes it easier to merge?


I'll add some soap tests if that's not something you can easily do now once you update your contribution.
User avatar (0036527)
winston (reporter)
2013-04-06 08:46
edited on: 2013-04-19 11:35

Hi

I added the requested security check and created the pull request with the title "New function added to retrieve bug history via API." [1]

[1] http://www.mantisbt.org/bugs/view.php?id=9936 [^]

EDIT: dregad added link to PR

User avatar (0036570)
mangtas (reporter)
2013-04-11 03:25

>Hi
>
>I added the requested security check and created the pull request with the title >"New function added to retrieve bug history via API."

Hi, how can I get your latest patch? what's a pull request? where can i find it?
User avatar (0036571)
atrol (developer)
2013-04-11 03:54

mangtas, have a look at https://github.com/mantisbt/mantisbt/pulls [^]

- Related Changesets
MantisBT: master-1.2.x f65336ce
Timestamp: 2013-04-06 08:27:40
Author: winston
Committer: rombert
Details ] Diff ]
New function added to retrieve bug history via API.

Fixes 0009936: add history information

Signed-off-by: Laszlo Kovacs <winston01@freemail.hu>
Signed-off-by: Robert Munteanu <robert@lmn.ro>
mod - api/soap/mantisconnect.wsdl Diff ] File ]
mod - api/soap/mc_issue_api.php Diff ] File ]
MantisBT: master 4308b1f0
Timestamp: 2013-04-06 08:27:40
Author: winston
Committer: rombert
Details ] Diff ]
New function added to retrieve bug history via API.

Fixes 0009936: add history information

Signed-off-by: Laszlo Kovacs <winston01@freemail.hu>
Signed-off-by: Robert Munteanu <robert@lmn.ro>
mod - api/soap/mantisconnect.wsdl Diff ] File ]
mod - api/soap/mc_issue_api.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2008-12-04 09:20 laurentb New Issue
2008-12-04 09:20 laurentb File Added: mc.zip
2009-10-06 03:40 vboctor Tag Attached: patch
2009-10-08 02:20 vboctor Status new => acknowledged
2011-12-13 02:31 vboctor Note Added: 0030562
2012-03-06 06:55 rombert Target Version => 1.3.x
2012-06-07 20:32 wmatusiak File Added: ticket_0009936.patch
2012-06-07 20:33 wmatusiak Note Added: 0032043
2012-06-07 20:41 wmatusiak Note Edited: 0032043 View Revisions
2012-06-09 23:20 vboctor Note Added: 0032056
2012-06-09 23:21 vboctor Note Added: 0032057
2012-06-10 06:04 rombert Note Added: 0032058
2012-06-10 16:08 wmatusiak Note Added: 0032064
2012-06-11 06:24 rombert Note Added: 0032066
2012-10-16 09:30 rombert Relationship added has duplicate 0014833
2012-12-03 08:00 winston File Added: mantis_history_SOAP.patch
2012-12-03 08:03 winston Note Added: 0034450
2012-12-03 08:04 winston Note Edited: 0034450 View Revisions
2012-12-15 19:02 rombert Note Added: 0034546
2012-12-15 19:02 rombert Assigned To => rombert
2012-12-15 19:02 rombert Status acknowledged => assigned
2012-12-15 19:02 rombert Description Updated View Revisions
2013-04-06 08:46 winston Note Added: 0036527
2013-04-11 03:25 mangtas Note Added: 0036570
2013-04-11 03:54 atrol Note Added: 0036571
2013-04-19 11:35 dregad Note Edited: 0036527 View Revisions
2013-04-20 08:41 rombert Target Version 1.3.x => 1.2.16
2013-04-21 15:24 rombert Relationship added related to 0014943
2013-06-30 15:51 rombert Changeset attached => MantisBT master-1.2.x f65336ce
2013-06-30 15:51 rombert Status assigned => resolved
2013-06-30 15:51 rombert Resolution open => fixed
2013-06-30 15:51 rombert Fixed in Version => 1.2.16
2013-06-30 15:51 rombert Changeset attached => MantisBT master 4308b1f0
2014-02-07 18:24 dregad Status resolved => closed


MantisBT 1.2.17 [^]
Copyright © 2000 - 2014 MantisBT Team
Time: 0.1244 seconds.
memory usage: 3,150 KB
Powered by Mantis Bugtracker