Esri / ago-assistant

A swiss army knife for your ArcGIS Online and Portal for ArcGIS accounts
https://ago-assistant.esri.com/
Apache License 2.0
152 stars 89 forks source link

Copy Storymaps #60

Closed mgayheart closed 9 years ago

mgayheart commented 10 years ago

Copying story maps between organizations causes the new storymap to be unusable. A workflow we are trying to support is prototyping a story map by multiple staff in the private AGOL and when they are finished, publish under an "official user" in the public AGOL.

glazou commented 9 years ago

Hi, you may be interested by these thread on GeoNet https://geonet.esri.com/message/444203#444203

@ecaldwell It would be great if the assistant could automatize the updating of the item URL

ecaldwell commented 9 years ago

I actually have an update that supports enterprise logins almost ready to go. Hoping to push out the updates before the new year.

Thanks for pointing me at that thread @glazou. It's great to have some additional context for how people are using the app.

glazou commented 9 years ago

No problem, great tool! Thanks

ecaldwell commented 9 years ago

There's now a workflow available (added with #64), albeit untested. You can copy the story map application, then edit the json of the new item to resolve any issues. Please post your feedback if you are able to try.

glazou commented 9 years ago

Thanks @ecaldwell

OAuth and editing the JSON is something that is going to be really useful for us.

I'm a bit afraid of documenting how user could use the 'edit JSON' feature to fix their item URL after copying them because all the risk of data corruption so I think I will stick to my procedure where user copy the item with your tool and then edit the item URL in ArcGIS Online.

Would be great if you could consider updating the item URL property when you copy it. That's something I'm desperately looking for. Hope this helps.

ecaldwell commented 9 years ago

Ah, thanks for reminding me this was about more than just enterprise logins.

They could use the action "update content URL" to do it from within the app, but they'd have to inspect the item first to get the new id from the JSON...not a simple workflow for every user.

I see two use cases when copying hosted applications:

  1. You just want to copy a reference to the original item into your org/portal, but the link still launches the original.
  2. You want to duplicate the original item, but then modify it to work with your own content (this is the use case the OP described).

In the second scenario, I agree automatically updating the appid parameter to the new item id would be helpful. Do you think it would cover all bases if the application simply looked for an appid parameter in the registered URL and, if it found one, automatically updated it to the new item id? I'm trying to think of any workflows or use cases where this might cause unexpected behavior.

glazou commented 9 years ago

I personally never needed the first scenario with hosted applications. I can see the first scenario useful for items that references app hosted elsewhere but not for hosted. I have seen couple of users being very confused about the edits that they make to the copied app being applied to the original app.

I think the following simple check is enough: if the original item id was also used in the item URL, then replace the original id with the new id in the copied item URL.

Thanks a lot!

ecaldwell commented 9 years ago

Sounds good. I'll give that a shot.

ecaldwell commented 9 years ago

@glazou I pushed an update to the staging site that automatically updates the appid parameter in the url. Can you test it out?

I'm seeing some funny behavior when copying publicly shared items from another ArcGIS Online org into your org. The appid parameter is updated and the rest of the URL reflects the original org (when viewing the JSON). However, when going to the item details page, the app url has been changed to reflect the destination org. I can't figure out if that's good or bad.

glazou commented 9 years ago

Thanks, the url update seems to works well.

I can also repro the item page behavior. I noticed that when editing the item, it display the original org id. This can be confusing as when you save the changes, the item page will then use the original org id. If you reload you will see the new one.

I think that if you copy to a different org, you should also update the org in the URL. If you copy to a public account, you should use www.arcgis.com

glazou commented 9 years ago

I noticed that after you edit the web app item the configure button goes missing. This is not an issue in AGOL assistant, it will get fixed with next ArcGIS Online release.

ecaldwell commented 9 years ago

OK thanks for confirming those behaviors @glazou. Updating the org url makes sense to me too. I'll let you know when I've had a chance to incorporate that so we can test a bit more.